From f6c933dd5f4ce06cc7d4a9316abebcca13784df2 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Tue, 10 Jul 2018 10:47:46 -0700 Subject: [PATCH] Remove plumber so that gulp script dies when failure occurs --- gulpfile.babel.js | 15 ++++++--------- package.json | 1 - 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 9a6c6f15b04..fbd48081648 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -16,18 +16,16 @@ import watch from 'gulp-watch'; const $ = gulpLoadPlugins(); const browserSync = require('browser-sync').create(); const isProduction = process.env.NODE_ENV === 'production'; -const onError = (err) => { - console.log(err); -} -console.log('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') -console.log(process.env) -console.log('&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&') -process.on('SIGINT', () => { - console.log('Caught SIGINT, exiting'); +process.on('SIGINT', (err) => { + console.log('Caught SIGINT, exiting', '\r\n', err); process.exit(0); }); +process.on('uncaughtException', (err) => { + console.log('Uncaught Exception, exiting', '\r\n', err); + process.exit(1); +}); // -- gulp.task('dev', ['build-dev'], () => { gulp.start('init-watch'); @@ -103,7 +101,6 @@ gulp.task('sass', () => { return gulp.src([ 'src/sass/**/*.scss' ]) - .pipe($.plumber({ errorHandler: onError })) .pipe($.sassLint()) .pipe($.sassLint.format()) .pipe($.sass({ precision: 5, importer: tildeImporter })) diff --git a/package.json b/package.json index e914938dc52..6ef83f75291 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "gulp-imagemin": "^4.1.0", "gulp-load-plugins": "^1.5.0", "gulp-newer": "^1.3.0", - "gulp-plumber": "^1.1.0", "gulp-sass": "^3.1.0", "gulp-sass-lint": "^1.3.2", "gulp-size": "^3.0.0",