Skip to content

Does Gulp v4 eliminate need for pump or pipeline? #2530

Answered by yocontra
rdhallman asked this question in Help
Discussion options

You must be logged in to vote

@rdhallman pipeline can be used like so:

import { pipeline } from 'stream'

export const someTask = (done) => {
  pipeline(a, b, c, d, done)
}

If you use it a lot you could also promisify it via the node util so you could just return it and save some syntax.

pipeline vs. pump I think is just personal preference. The way pipeline works was based off of pump / pumpify (mafintosh projects) so the behavior should be nearly identical - I do know from personal experience that pipeline has some edge cases but I think they are resolved as of node 15.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@phated
Comment options

Answer selected by phated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants