From f1394c7b1a208d8a74b9feba0106e0047038340f Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 10 Jun 2015 11:29:15 -0500 Subject: [PATCH] Don't break watch on transpile errors --- gulpfile.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index f49e5901a7..5551782853 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -122,8 +122,16 @@ gulp.task('transpile', function() { return gulp.src(['ionic/**/*.js', '!ionic/components/*/test/**/*']) .pipe(cache('transpile', { optimizeMemory: true })) .pipe(traceur(traceurOptions)) + .on('error', function (err) { + console.log("ERROR: " + err.message); + this.emit('end'); + }) .pipe(gulp.dest('dist/js/es6/ionic')) .pipe(babel(babelOptions)) + .on('error', function (err) { + console.log("ERROR: " + err.message); + this.emit('end'); + }) .pipe(gulp.dest('dist/js/es5/ionic')) }); @@ -163,7 +171,7 @@ gulp.task('examples', function() { .pipe(cache('examples', { optimizeMemory: true })) .pipe(gulpif(/.js$/, buildTest())) .on('error', function (err) { - console.log(err.message); + console.log("ERROR: " + err.message); this.emit('end'); }) .pipe(gulpif(/index.js$/, createIndexHTML()))