Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to see that all tasks finished? #64

Closed
iliakan opened this issue May 20, 2016 · 2 comments
Closed

How to see that all tasks finished? #64

iliakan opened this issue May 20, 2016 · 2 comments

Comments

@iliakan
Copy link

iliakan commented May 20, 2016

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') or gulp.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.

@phated
Copy link
Member

phated commented May 20, 2016

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)

@phated phated closed this as completed May 20, 2016
@iliakan
Copy link
Author

iliakan commented May 21, 2016

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants