here is my current watchlist for my gulpfile.js
// Gulp watchlist gulp.task('watch', ['browserSync', 'sass'], function(){ gulp.watch('app/scss/**/*.scss', ['sass']); gulp.watch('app/*.html').on('change', browserSync.reload); gulp.watch('app/js/**/*.js').on('change', browserSync.reload); //add more watchers here });
and it works.
but the tutorial that I follow has a little different:
gulp.task('watch', ['browserSync', 'sass'], function (){ gulp.watch('app/scss/**/*.scss', ['sass']);
Do I need .on ('change', browserSync.reload)? it works; I'm just curious that what I'm doing is not a good practice. Thanks!
javascript gulp gulp-sass gulp-watch
Brock vond
source share