Closed iliakan closed 8 years ago
The gulp CLI listens to events to do logging, so we are definitely still emitting events. They are going to continue to remain undocumented because we don't want people to use them. To handle this use case, you should just be able to chain .series(allYourTasks, onTotallyDoneCloseConnection)
I'm running gulp taskA taskB
from CLI.
How from inside Gulpfile.js
I can see that all tasks are done?
Guess, no way, I should make my own way of running tasks, instead of CLI ?
That's a follow-up of #55, because the answer to that issue is obviously wrong, it was closed on a mistake.
How to see that all tasks are finished? In Gulp3 it was possible:
gulp.on('stop')
orgulp.on('err')
. But in Gulp4, there seems to be no such way.An example of a use case would be to disconnect from database when gulp is done or tests are passed.
P.S.
process.on('exit')
does not help here at all, because the process don't exit when gulp finishes.P.P.S. I also guess that might be not undertaker-related, but include the overall architecture.