I'm using gulp-plumber + gulp-notify and want to put task name in gulp-notify as a title. following is the code i wrote, thanks in advance.
gulp.task('SOMETASK', function() {
return gulp.src(sourcePaths)
.pipe(plumber({errorHandler: notify.onError({
message: "<%= error.message %>",
title: "I WANT TO PUT TASK NAME HERE"
})}))
// omitted below
});
If you want to monkey-patch Gulp, the following will work with Gulp version
3.9.0
:Running
gulp build
will yield the following console output:Define the task name outside of the callback and reference it where needed.