This module provides an engine for rendering Mustache templates in Sail.js applications. Internally, Hogan.js is used to render templates.
$ component install sailjs/render-hogan
$ volo add sailjs/render-hogan
Register engine with render to process Mustache templates:
render.engine('text/x-mustache-template', hogan());
Hogan.js does not ship with AMD support. Be sure to include a shim, so that
hogan
it is usable within an AMD loader.
require.config({
shim: {
'hogan': {
exports: 'Hogan'
}
}
});
This module uses the AMD format. To include in component builds, use component-amd:
component build -u component-amd
To run tests in a browser, execute the Make target for the desired browser:
$ make test-chrome
$ make test-firefox
$ make test-safari
Headless tests can be executed directly from a terminal:
$ make test-phantomjs
Copyright (c) 2013 Jared Hanson <http://jaredhanson.net/>