Answer the question
In order to leave comments, you need to log in
How to rewrite this task to the new version of GULP, i.e. without tasks?
gulp.task('less', wrapPipe(function(success, error) {
return gulp.src('less/*.less')
.pipe(less().on('error', error))
.pipe(gulp.dest('app/css'));
}));
function wrapPipe(taskFn) {
return function(done) {
var onSuccess = function() {
done();
};
var onError = function(err) {
done(err);
}
var outStream = taskFn(onSuccess, onError);
if(outStream && typeof outStream.on === 'function') {
outStream.on('end', onSuccess);
}
}
}
Answer the question
In order to leave comments, you need to log in
The gulp site, of course, you didn't bother to look at https://gulpjs.com/docs/en/getting-started/creatin...
But there is all the necessary information there.
Pictures are not displayed because the blocks are empty, they collapsed
Well, I don’t observe these problems
jsfiddle.net/Zoxon/agUX4/1/show
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question