How to get task name inside task in gulp
gulp.task('SOMETASK',function() {
console.log('Task name:', this.seq.slice(-1)[0]) // Task name: SOMETASK
})
gulp.Gulp.prototype.__runTask = gulp.Gulp.prototype._runTask;
gulp.Gulp.prototype._runTask = function(task) {
this.currentTask = task;
this.__runTask(task);
}
gulp.task("someTask", function(){
console.log( this.currentTask.name );
}