mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Fix reload loops when CSS/JS is changed
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user