diff --git a/gulpfile.js b/gulpfile.js index 6b453235..b29252c4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -82,10 +82,10 @@ function browserSyncReload(done) { } function watchFiles() { - gulp.watch("RIGS/static/scss/**/*", styles); - gulp.watch("RIGS/static/js/**/*", scripts); - gulp.watch(['templates/**/*.html', 'RIGS/templates/**/*.html', 'assets/templates/**/*.html', 'versioning/templates/**/*.html'], browserSyncReload); - //gulp.watch("gulpfile.js", gulp.parallel(styles, scripts)); TODO This causes a reload loop + gulp.watch("RIGS/static/scss/**/*.scss", gulp.series(styles, browserSyncReload)); + // TODO This prevents reload looping, but means we don't reload if new third party scripts are added + gulp.watch("RIGS/static/js/src/*", gulp.series(scripts, browserSyncReload)); + gulp.watch(['templates/**/*.html', 'RIGS/templates/**/*.html', 'assets/templates/**/*.html', 'versioning/templates/**/*.html'], browserSyncReload); } exports.build = gulp.parallel(styles, scripts);