Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 507 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 507 Bytes

gulp-require-pug

Load pug into your JavaScript.

Usage

$ npm install --save-dev gulp-require-pug
const gulp = require('gulp')
const requirePug = require('gulp-require-pug')

gulp.task('scripts', () => {
  return gulp.src('src/**/*.js')
    .pipe(requirePug({
      // Any pug options are allowed here
      basedir: '/path/to/basedir',

      // Data should belong to `data`
      data: {
        hello: 'world'
      }
    }))
    .pipe(gulp.dest('dest'))
})

License

MIT