Closed agopshi closed 9 years ago
It looks like streams have an end
event. We should be able to do something like this:
gulp.task('js', ['clean-js'], function(done) {
var taskFuncsLeft = taskFuncs.length;
for (var i = 0; i < taskFuncs.length; ++i)
{
var taskFunc = taskFuncs[i];
taskFunc().on('end', function() {
if (--taskFuncsLeft <= 0)
{
done();
}
});
}
});
That should call the done()
callback when all of the task funcs finish.
Fixed in v0.1.0.
The
done
callback is never called. Even through the task will usually complete successfully, Gulp will not know about its completion.