The Dust project is no longer maintained.
Precompile Dust templates
Issues with the output should be reported on the Dust issue tracker.
$ npm install --save-dev gulp-dust
const gulp = require('gulp');
const dust = require('gulp-dust');
gulp.task('default', () =>
gulp.src('templates/list.html')
.pipe(dust())
.pipe(gulp.dest('dist'))
);
Type: Object
Type: Function
Default: Filename (templates/list.html
=> list
)
You can override the default behavior by supplying a function which gets the current File object and is expected to return the name.
Example:
dust({
name: file => 'custom'
});
Type: Object
Default: {whitespace: false, amd: false, cjs: false}
Corresponds to dust.config
. Use it to override any dust configuration value.
Type: boolean
Default: false
Preserve whitespace.
Type: boolean
Default: false
Compile as AMD modules.
Type: boolean
Default: false
Compile as CommonJS modules.
MIT © Sindre Sorhus