Answer the question
In order to leave comments, you need to log in
Compiling modified Pug.js files?
Good day, toasters.
I use html template engine - pug.js in conjunction with gulp. Wrote a task
gulp.task("compile:views", function() {
return gulp.src('source/pug/*.pug')
.pipe($.plumber())
.pipe($.pug({
pretty: true
}))
.pipe(gulp.dest('build/'))
.pipe($.notify( { title: 'Compile:views' , message: 'Compile:views task completed'} ))
});
Answer the question
In order to leave comments, you need to log in
No plugin is needed, we use the standard gulp watcher. On the Gulp4 syntax it will look like this:
For Gulp3:gulp.watch('app/**/*.pug', ['pug']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question