Module to automatically compile and cache dustjs (.dust) files.
InstallationThis package is available on npm as:
npm install dustjs-loader
Examples
Example using a callback:
require('dustjs-loader').register({
path: 'lib/templates'
});
var template = require('./template.dust');
template({ foo : 42 }, function (error, html) {
if (error) { ... }
...
});
Example using a promise:
require('dustjs-loader').register({
path : 'lib/templates',
promise : true
});
var template = require('./template.dust');
template({ foo : 42 })
.then(function (html) {
...
})
.catch(function (error) {
...
});
Dust templates in the browser
The dustjs-browserify module makes it easy to use dust templates in the browser.
Dustjs documentationMIT
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4