gulp-plumber-error-handler
Version:
Error handler for gulp-plumber
21 lines (17 loc) • 361 B
JavaScript
var gutil = require('gulp-util');
module.exports = function (title) {
return function (error) {
gutil.log([
gutil.colors.bold.red(title || 'Error in ' + error.plugin),
'',
error.message,
''
].join('\n'));
// Run with `--beep`
if (gutil.env.beep) {
gutil.beep();
}
// Keep gulp from hanging on this task
this.emit('end');
};
};