Render dust templates into HTML
Issues with the output should be reported on the Dust issue tracker.
$ npm install --save-dev gulp-dust-html dustjs-linkedin
var gulp = require('gulp');
var dust = require('dustjs-linkedin');
dust.helpers = require('dustjs-helpers').helpers;
var dusthtml = require('gulp-dust-html');
gulp.task('default', function () {
return gulp.src('templates/index.html')
.pipe(dusthtml({
basePath: 'templates',
data: data
}))
.pipe(gulp.dest('dist'));
});
Type: string
Default: '.'
Relative templates directory path (used to resolve partials).
Example: templates
Type: boolean
Default: false
Preserve whitespace.
Type: object
or function
Default: {}
Context which is passed to dust templates. If a function is provided the function will be called with one parameter, the name of the file
Type: string
Default: .dust
Default extension used for templates
Type: object
Default: {}
Use it to override any of the dust.config values, e.g. cache
or amd
.
- Update tests to reflect the new codebase
- Think of a better way to handle context passing (maybe a
contents
directory?)
MIT