Skip to content

Latest commit

 

History

History
62 lines (38 loc) · 1.16 KB

readme.md

File metadata and controls

62 lines (38 loc) · 1.16 KB

gulp-dust Build Status

Precompile Dust templates

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

Install

$ npm install --save-dev gulp-dust

Usage

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

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

API

dust([options])

options

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

Type: boolean
Default: false

Preserve whitespace.

License

MIT © Sindre Sorhus