/dustjs-brunch

Primary LanguageCoffeeScript

dustjs-brunch

Adds Linked In dust.js support to brunch.

Installation

Since this package has not been published yet, add "dust-brunch": "git@github.com:0x6e6562/dustjs-brunch.git".

Usage:

Create a Mustache template

# views/templates/city.dust
I live in {{name}}

Require the template

compiled_template = require 'views/templates/city'

Load template into dustjs cache object

dust.loadSource(compiled_template)

Render the template with some data:

dust.render('city', {'name': 'San Francisco'}, function(error, output) {
	if (!error) {
		$el.html(output);
	}
})