Gulp plugin for compiling Pug templates using the latest stable version of Pug Template Engine.
MIT License
Compiles your pug templates into 'html' or 'js' easily and always uses the latest stable version of Pug Template Engine.
npm install --save-dev gulp-pug-3
In addition to Pug's API: client, extension and locals options are available.
const pug = require('gulp-pug-3');
gulp.task('build', () =>
gulp.src('public/**/*.pug')
.pipe(
pug({
// Your options.
})
)
.pipe(gulp.dest('dist'));
);
gulp.task('build:X', () =>
gulp.src('public/**/*.pug')
.pipe(
pug({
locals: { dir: 'rtl', lang: 'es' },
extension: 'htm',
// Pug API default opts...
basedir: `${__dirname}/public`
})
)
.pipe(gulp.dest('dist'));
)
When you encounter a problem, please open an issue. I would be glad to help you to find a solution if possible.
Github: @orcunsaltik
See the LICENSE file for license rights and limitations (MIT).