gulp-community / gulp-pug

Gulp plugin for compiling Pug templates
MIT License
522 stars 80 forks source link
gulp gulp-plugin pug

gulp-pug

NPM version Downloads Build Status Coveralls Status

Gulp plugin for compiling Pug templates. Enabling you to compile your Pug templates into HTML or JS, with support for template locals, custom Pug filters, AMD wrapping, and others.

Usage

const { src, dest } = require('gulp');
const pug = require('gulp-pug');

exports.views = () => {
  return src('./src/*.pug')
    .pipe(
      pug({
        // Your options in here.
      })
    )
    .pipe(dest('./dist'));
};

API

pug([opts])

To change opts.filename use gulp-rename before gulp-pug.

Returns a stream that compiles Vinyl files as Pug.

Also See

License

MIT