5.0.0 • Published 7 years ago

gulp-dust v5.0.0

Weekly downloads
2,548
License
MIT
Repository
github
Last release
7 years ago

Deprecated

The Dust project is no longer maintained.


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

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

gulp.task('default', () =>
	gulp.src('templates/list.html')
		.pipe(dust())
		.pipe(gulp.dest('dist'))
);

API

dust(options)

options

Type: Object

name

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'
});
config

Type: Object Default: {whitespace: false, amd: false, cjs: false}

Corresponds to dust.config. Use it to override any dust configuration value.

whitespace

Type: boolean Default: false

Preserve whitespace.

amd

Type: boolean Default: false

Compile as AMD modules.

cjs

Type: boolean Default: false

Compile as CommonJS modules.

License

MIT © Sindre Sorhus

5.0.0

7 years ago

4.0.0

8 years ago

3.0.0

10 years ago

2.1.0

10 years ago

2.0.0

10 years ago

1.1.0

10 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.1

11 years ago

0.1.0

12 years ago