diff options
author | Andrew Dolgov <[email protected]> | 2020-09-18 12:14:37 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-18 12:14:37 +0300 |
commit | 4f5ae94b62b0e949adda5a5e2672cc79a193c02d (patch) | |
tree | b1d5add10b29aa5ff4e1c1a3ae37e411ef276c06 | |
parent | f3803c9e6022ab6933cc0713326d24114e368d2a (diff) |
prevent source errors from crashing gulp watch
-rw-r--r-- | gulpfile.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js index 97f7443d1..e04cc85d0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,11 +2,18 @@ const gulp = require('gulp'); const less = require('gulp-less'); +function swallowError(error) { + console.log(error.toString()) + + this.emit('end') +} + gulp.task('less', function(cb) { gulp .src(['themes/compact.less', 'themes/compact_night.less', 'themes/light.less', 'themes/night_blue.less', 'themes/night.less']) .pipe(less()) + .on('error', swallowError) .pipe( gulp.dest(function(f) { return f.base; |