-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
gulp.trigger(taskName) should be a through stream #32
Comments
If plugins could get a reference to the gulp engine, this would make a cool plugin. |
@robrich that can be dangerous though. Plugins should be relatively stateless. If plugins were able to get into the task system I feel like that would lead to grunt where plugins are responsible for creating their own tasks in the system and you're supposed to just assume the names |
The only question in my mind about this is the behavior. Should it fire for every file that passes through or should it wait until the entire upstream is done before firing then pass everything through? Flag to toggle each behavior? |
I see the point. If plugins can reach into the main system, things could quickly get out of hand. I think it should trigger on stream end as you can't pass the filename into the other task, and if you wanted to you should pipe into a plugin in the current task instead. |
Closing this - I don't think it is a good idea (otherwise I would have implemented it by now) If anyone has arguments for/against it I'm still open to discussion |
An alternative is to execute the reload task within the run callback, since it is executed once all tasks are finished: gulp.run 'js', 'coffee', (err)->
gulp.run('reload') if !err |
This makes this use case possible
So really just an es.map stream that does nothing but trigger a task and passes the same file through when its done.
The text was updated successfully, but these errors were encountered: