-
-
Save Lukas238/ffc862030381091c67b1 to your computer and use it in GitHub Desktop.
gulp-plumber error handling 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var plumber = require('gulp-plumber'), | |
notify = require('gulp-notify'), | |
gutil = require('gulp-util'); | |
var gulp_src = gulp.src; | |
gulp.src = function() { | |
return gulp_src.apply(gulp, arguments) | |
.pipe(plumber(function(error) { | |
gutil.log(gutil.colors.red(error.plugin + ': ' + error.message)); | |
gutil.log(gutil.colors.yellow('Line '+ error.line+', Column ' + error.column + ' | ' + error.file)); | |
gutil.log(gutil.colors.grey('Path: ' + error.fileName)); | |
gutil.beep(); | |
this.emit('end'); | |
}) | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment