mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -05:00
Only reload changed files
This commit is contained in:
parent
bea70a1c00
commit
e6d8259f25
1 changed files with 4 additions and 4 deletions
|
@ -144,9 +144,9 @@ gulp.task("modernizr", function() {
|
||||||
gulp.task("watch", function() {
|
gulp.task("watch", function() {
|
||||||
const gLiveReload = require("gulp-livereload");
|
const gLiveReload = require("gulp-livereload");
|
||||||
|
|
||||||
const liveReloadUpdate = function(wait) {
|
const liveReloadUpdate = function(files, wait) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
gLiveReload.changed(".");
|
gLiveReload.changed(files);
|
||||||
}, wait || 1);
|
}, wait || 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -155,8 +155,8 @@ gulp.task("watch", function() {
|
||||||
gulp.watch(jsDashboard, [ "js-dashboard" ]).on("change", liveReloadUpdate);
|
gulp.watch(jsDashboard, [ "js-dashboard" ]).on("change", liveReloadUpdate);
|
||||||
gulp.watch([ "app/**/*.php", "routes/**/*.php", "resources/views/**/*.blade.php" ]).on("change", liveReloadUpdate);
|
gulp.watch([ "app/**/*.php", "routes/**/*.php", "resources/views/**/*.blade.php" ]).on("change", liveReloadUpdate);
|
||||||
|
|
||||||
gulp.watch("resources/assets/sass/**/*.scss", [ "sass-public", "sass-dashboard" ]).on("change", function() {
|
gulp.watch("resources/assets/sass/**/*.scss", [ "sass-public", "sass-dashboard" ]).on("change", function(files) {
|
||||||
liveReloadUpdate(1000);
|
liveReloadUpdate(files, 1000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue