Skip to content

jrrbru/gulp-dust-compile

 
 

Repository files navigation

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

About

Precompile Dust templates

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%