-
-
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
Is it possible to join outputs #177
Comments
Yes it's possible -- I'm unsure if any gulp plugin exists (most likely). All you need to do is pipe multiple streams to a single stream, and then send end event once the last stream is finished. |
not sure that a return value of a task should be the stream... seems more like a task for an internal function and function getStream1() {
return gulp.src( ... )
pipe( ... );
}
function getStream2() {
return gulp.src( ... )
pipe( ... );
}
require('event-stream')
.merge( getStream1(), getStream2() /*, ... */ )
.pipe( gulp.dest( ... ) ); |
@stryju That's the idea I was considering. If OP wants streams piped syncrhonously (order), then that's an entirely different story. |
@dashed i didn't say that |
As a point of clarification, you can combine streams this way. Tasks don't pipe results into other tasks. You're on the right track thinking about this with piping plugins and functions together. Well done. |
👍 @robrich |
@stryju I see. I had meant that your example implied as such. |
The lazypipe module might help here |
Anyways to sum up the answers: event-stream's .merge, gulp-util's .combine, normal stream pipes, lazypipe, etc. |
thanks a lot for all your answers :) |
Hi @dashed you mentioned about merging streams with order, what are the best options for that? |
@clkao using multiple streams in one task (the second example). |
@darsain thanks streamqueue works great! |
streamqueue really worked great! |
Is it possible to combine the input of two steps for the next step like this:
inputA --> taskA __
..................................
.................................... --- taskF --> output
inputB --> taskB __/
If so, how? If not, are there any ideas how to get that kind of pipeline flexibility?
The text was updated successfully, but these errors were encountered: