Description

Diet filter plugin for coffescript.

Package Information

Version0.1.0 (2014-Oct-06)
Repository https://github.com/MartinNowak/diet-coffee
LicenseMIT
CopyrightCopyright © 2014 -, Martin Nowak
AuthorsMartin Nowak
Registered byMartin Nowak
Dependencies

vibe-d

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

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.

Available versions

0.1.0 ~master