From 022119a3c95bf08faf427e616c68470555427fe4 Mon Sep 17 00:00:00 2001 From: Koslun Date: Fri, 5 Aug 2016 13:09:23 +0200 Subject: [PATCH 1/2] fix(gulp:build): remove typings task from non-ts The typings task was erroneously included in the gulp build even in non-typescript scaffolds. fixes #2110 --- templates/app/gulpfile.babel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/app/gulpfile.babel.js b/templates/app/gulpfile.babel.js index 3272062f0..ed8bd349f 100644 --- a/templates/app/gulpfile.babel.js +++ b/templates/app/gulpfile.babel.js @@ -491,8 +491,8 @@ gulp.task('build', cb => { 'inject', 'transpile:server', [ - 'build:images', - 'typings' + 'build:images'<% if(filters.ts) { %>, + 'typings'<% } %> ], [ 'copy:extras', From 37072031d35ee695fd82e5bf6ee3989778a371e1 Mon Sep 17 00:00:00 2001 From: Koslun Date: Fri, 5 Aug 2016 13:24:00 +0200 Subject: [PATCH 2/2] fix(gulp:build): fix crash upon ts type errors TS somehow started emitting the type errors as errors that are then propagating to webpack and finally gulp. Thus need to catch and recover from thrown errors. closes #2039, #2110 --- templates/app/gulpfile.babel.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/app/gulpfile.babel.js b/templates/app/gulpfile.babel.js index ed8bd349f..dae0cb2f5 100644 --- a/templates/app/gulpfile.babel.js +++ b/templates/app/gulpfile.babel.js @@ -236,6 +236,9 @@ gulp.task('webpack:dist', function() { const webpackDistConfig = makeWebpackConfig({ BUILD: true }); return gulp.src(webpackDistConfig.entry.app) .pipe(webpack(webpackDistConfig)) + .on('error', (err) => { + this.emit('end'); // Recover from errors + }) .pipe(gulp.dest(`${paths.dist}/client`)); });