Compiles CoffeeScript in Diet templates to JavaScript and caches the result.
To register the plugin you have to import diet_coffee;
in your application.
import vibe.d;
import diet_coffee;
//...
void hello(HTTPServerRequest req, HTTPServerResponse res)
{
res.render!"coffee.dt"();
}
Now you can use the :coffee
textfilter in your diet files.
doctype html
html
head
title Hello, CoffeeScript
body
:coffee
window.onload = -> alert document.title
See example for a complete vibe.d app.