gulp-dust

Precompile Dust templates

npm install gulp-dust
2 downloads in the last day
54 downloads in the last week
275 downloads in the last month

gulp-dust Build Status

Precompile Dust templates

Issues with the output should be reported on the Dust issue tracker.

Install

Install with npm

npm install --save-dev gulp-dust

Example

var gulp = require('gulp');
var dust = require('gulp-dust');

gulp.task('default', function () {
    gulp.src('templates/list.html')
        .pipe(dust())
        .pipe(gulp.dest('dist'));
});

API

dust([name])

name

Type: Function
Default: Relative template path. Example: templates/list.html

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(function (file) {
    return 'tpl-' + file.relative;
})

License

MIT © Sindre Sorhus

npm loves you