Neoanthropic Preternatural Murmurings

npm

Need private packages and team management tools?Check out npm Orgs. »

gulp-dust-2.7

4.0.0 • Public • Published

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', () => {
    return gulp.src('templates/list.html')
        .pipe(dust())
        .pipe(gulp.dest('dist'));
});

API

dust([options])

options

name

Type: function
Default: Filename. Example: 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

install

npm i gulp-dust-2.7

Downloadsweekly downloads

0

version

4.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability