Skip to content

MartinNowak/diet-coffee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diet plugin for CoffeeScript


Compiles CoffeeScript in Diet templates to JavaScript and caches the result.

Usage

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.

About

Diet plugin for CoffeeScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages