Grunt task to compile Dust.js templates.
Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-dustjs
.
Then add this line to your project's grunt.js
gruntfile:
grunt.loadNpmTasks('grunt-dustjs');
Inside your grunt.js
file, add a section named dustjs
. This section specifies the Dust.js template files to compile.
This defines what files this task will process and should contain key:value pairs.
The key (destination) should be an unique filepath (supports grunt.template) and the value (source) should be a filepath or an array of filepaths (supports minimatch).
// project configuration
grunt.initConfig({
dustjs: {
compile: {
files: {
"js/templates.js": ["src/templates/**/*.html"]
}
}
},
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
- 25/09/2012 - 0.1.2: Initial release.
Copyright (c) 2012 Stanislav Lesnikov Licensed under the MIT license.