Closed HectorLS closed 8 years ago
It looks like the del package was updated to remove the callback function, it now takes a promise. (https://github.com/sindresorhus/del/releases refer to the 2.0 release.)
I am trying to pass the promise in directly but gulp appears to not like that at all....
function clean(path, done) {
log('cleaning: ' + $.util.colors.blue(path));
del(path).then(done);
}
I was able to make it work, but I don't think it's very clean...
function clean(path, done) {
log('cleaning: ' + $.util.colors.blue(path));
del(path).then(function(){
done();
});
}
Thoughts?
Awesome ! it works! thank you man :) I think looks cleaner if you indent like this: (more lines but if you gonna have more than 1 promise its really helpful )
function clean(path, done) {
log('cleaning: ' + $.util.colors.blue(path));
del(path)
.then(function(){
done();
});
}
If done as a promise, won't this work? It seems to be working for me with the new version for del del(path).then(done());
del(path, done()); was also successful
Hi, everything is working fine as you can see
but i got this problem when i add the 'done' callback
Do you see ? the task stopped after log message :(