Increase gulp.watch() interval to decrease CPU usage
This brings idle CPU usage down to 1.5% from 14% for me.
This commit is contained in:
parent
8bc76dd2db
commit
8f116f60c4
1 changed files with 4 additions and 2 deletions
|
@ -132,13 +132,15 @@ gulp.task('sass', () => {
|
|||
gulp.task('build', ['js', 'sass', 'symlink']);
|
||||
|
||||
gulp.task('dev', ['clean'], () => {
|
||||
let watcher = gulp.watch(jsGlob);
|
||||
var interval = 750;
|
||||
|
||||
let watcher = gulp.watch(jsGlob, { interval });
|
||||
|
||||
watcher.on('change', function(event) {
|
||||
getJS(event.path);
|
||||
});
|
||||
|
||||
gulp.watch('src/styles/*.scss', ['sass']);
|
||||
gulp.watch('src/styles/*.scss', { interval }, ['sass']);
|
||||
gulp.start('build');
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue