Skip to content
Snippets Groups Projects
Commit 2222c4a8 authored by Tim Fechner's avatar Tim Fechner
Browse files

Modify gulpfile to skip errors instead of breaking

Read this for further information:
  https://github.com/gulpjs/gulp/issues/259
parent 3f002668
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -62,7 +62,7 @@ function buildContribJavascript() {
function buildCustomJavascript() {
return gulp.src(src + 'js/**/*')
.pipe(plugins.uglify())
.pipe(plugins.uglify().on('error', handleError))
.pipe(plugins.rename({suffix: '.min'}))
.pipe(gulp.dest(dst + 'js'))
};
......@@ -70,3 +70,8 @@ function buildCustomJavascript() {
function cleanup() {
gulp.src(dst, {read: false}).pipe(plugins.clean())
};
function handleError(err) {
console.log('[\033[31mCritical\033[0m] Line '+err.lineNumber+' in '+err.message);
this.emit('end');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment