var syntax = "scss";
gulp.task("browser-sync", function() {
browserSync({
server: {
baseDir: "app"
},
notify: false,
open: false
});
});
gulp.task("pug", function() {
gulp
.src("app/pug/*.pug")
.pipe(
pug({
doctype: "html",
pretty: true
})
)
.pipe(gulp.dest("app/"))
.pipe(browserSync.stream());
});
gulp.task("watch", function() {
gulp.watch("app/pug/*.pug", gulp.parallel("pug"));
});
gulp.task(
"default",
gulp.parallel("pug", "styles", "browser-sync", "watch")
);
var browserSync = require('browser-sync').create()
var bsConfig = {
server: {
baseDir: 'app'
},
notify: false,
open: false
};
gulp.task('watch', function(){
browserSync.init(bsConfig);
gulp.watch("app/pug/*.pug", gulp.parallel("pug"));
})
Watcher
предлагаю использовать таким способом)