I\'m working through a pluralsight course on gulp. John Papa is demonstrating how to inject a function that deletes existing css files, into the routine that compiles the n
del
isn't a Node's command, it's probably this npm package. If that's the case it doesn't receive a callback as second parameter, instead it returns a promise and you should call .then(done)
to get it called after the del
finishes.
Update
A better solution is to embrace the Gulp's promise nature:
Change your clean
function to:
function clean(path) {
return del(path); // returns a promise
}
And your clean-styles
task to:
gulp.task('clean-styles', function(){
var files = config.temp + '/**/*.css';
return clean(files);
});