summaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-18 12:14:37 +0300
committerAndrew Dolgov <[email protected]>2020-09-18 12:14:37 +0300
commit4f5ae94b62b0e949adda5a5e2672cc79a193c02d (patch)
treeb1d5add10b29aa5ff4e1c1a3ae37e411ef276c06 /gulpfile.js
parentf3803c9e6022ab6933cc0713326d24114e368d2a (diff)
prevent source errors from crashing gulp watch
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js7
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;