The template rendering engine used by Sail.js applications.
$ component install sailjs/render
$ volo add sailjs/render
First, register the engine used to render your templates.
render.engine('text/x-mustache-template', mustache());
Add templates to your HTML document.
<script id="hello-template" type="text/x-mustache-template">
<p>Hello, {{name}}</p>
</script>
Render a template by passing its ID and any variables to be subtituted into the rendered HTML.
render('hello', { name: 'Dave' });
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) 2012-2013 Jared Hanson <http:https://jaredhanson.net/>