Skip to content
This repository was archived by the owner on Mar 31, 2020. It is now read-only.

Commit 3d7ff60

Browse files
authored
Merge pull request #641 from jeffturcotte/watch-options
Added ability to configure watch
2 parents f32ba7c + 07824e4 commit 3d7ff60

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/Config.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,23 @@ const config = {
362362
proxy: 'homestead.app',
363363
reloadOnRestart : true,
364364
notify: true
365-
}
365+
},
366+
367+
/*
368+
|----------------------------------------------------------------
369+
| Watch
370+
|----------------------------------------------------------------
371+
|
372+
| Configure how your filesystem is monitored for changes. This
373+
| modifies the behavior of any task using "watch."
374+
|
375+
*/
366376

377+
watch: {
378+
// https://www.npmjs.com/package/gulp-watch/#options
379+
interval: 1000,
380+
usePolling: true
381+
}
367382
};
368383

369384
/**

src/tasks/recipes/watch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ gulp.task('watch', () => {
1818

1919
Elixir.tasks.forEach(task => {
2020
let batchOptions = Elixir.config.batchOptions;
21+
let watchOptions = Elixir.config.watch;
2122

2223
if (task.hasWatchers()) {
23-
gulp.watch(task.watchers, { interval: 1000, usePolling: true }, batch(batchOptions, events => {
24+
gulp.watch(task.watchers, watchOptions, batch(batchOptions, events => {
2425
events.on('end', gulp.start(task.name));
2526
}));
2627
}

0 commit comments

Comments
 (0)