Open maxklenk opened 9 years ago
I "merged" the issues in this one because the global handling will be the same.
I was able to get the watch tasks listening for add/remove events, but only with a big performance losses. My script
task took 6 seconds when using browserSync for the watches, it normally takes about 3 seconds.
The code to make it work like this:
var watchOptions = {
//persistent: true,
//ignored: '*.txt',
ignoreInitial: true,
//followSymlinks: true,
//cwd: '.',
usePolling: true
//alwaysStat: false,
//depth: undefined,
//interval: 100,
//ignorePermissionErrors: false,
//atomic: true
};
browserSync.watch(config.app.js, watchOptions, function (event, file) {
gulp.start('scripts')
});
Subtasks:
34 ...would automatically copy new images to the dist folder.
17 ...would include new script files automatically
10 Automatically remove files from watcher when they are deleted