@unisharp/gulp-pug-inheritance
v1.0.1
Published
Gulp Pug Inheritance
Downloads
11
Readme
Gulp Pug Inheritance
Only build affected files when modify a Pug file.
Installation
Via npm
npm install @unisharp/gulp-pug-inheritance --save
Via yarn
yarn add @unisharp/gulp-pug-inheritance
Usage
'use strict';
const gulp = require('gulp');
const pug = require('gulp-pug');
const pugInheritance = require('@unisharp/gulp-pug-inheritance');
gulp.task('watch-pug', () => {
return gulp.watch('resources/pug/**/*.pug', e => {
gulp.src(e.path, { base: 'resources/pug' })
.pipe(pugInheritance('resources/pug/**/*.pug'))
.pipe(pug({ pretty: true }))
.pipe(gulp.dest('resources/views'));
});
});