Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Throw err after catching err
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-andrews committed Jun 18, 2015
1 parent a365ef9 commit ffc09ec
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ gulp.task('build-sass', function() {
buildFolder: buildFolder,
env: isDev ? 'development' : 'production'
})
.on('end', function () {
.on('end', function() {
console.log('build-sass completed');
})
.on('error', function () {
.on('error', function(err) {
console.warn('build-sass errored');
throw err;
});
});

Expand All @@ -58,11 +59,12 @@ gulp.task('build-js', function() {
buildFolder: buildFolder,
env: 'development' // need to run as development as we do our own sourcemaps
})
.on('end', function () {
.on('end', function() {
console.log('build-js completed');
})
.on('error', function () {
.on('error', function() {
console.warn('build-js errored');
throw err;
});
});

Expand All @@ -72,11 +74,12 @@ gulp.task('build-minify-js', ['build-js'], function() {
.pipe(extractSourceMap({ saveTo: buildFolder + mainJsSourceMapFile }))
.pipe(minify({ sourceMapIn: buildFolder + mainJsSourceMapFile, sourceMapOut: '/' + app + '/' + mainJsSourceMapFile }))
.pipe(gulp.dest(buildFolder))
.on('end', function () {
.on('end', function() {
console.log('build-minify-js completed');
})
.on('error', function () {
.on('error', function() {
console.log('build-minify-js errored');
throw err;
});
});

Expand Down

0 comments on commit ffc09ec

Please sign in to comment.