Theoretical question about forking a stream in gulp
See original GitHub issueHey there. I’m relatively new to gulp and streams but I have the following situation. I have two pipelines A and B where A and B both have 5 steps in the pipeline where the first 3 are the same. Theoretically and from an efficiency standpoint it would make sense to use the same pipeline for the first 3 steps and then fork the pipeline into two separate ones.
I’d think of something like this:
gulp.src('./src/*.js')
.pipe(sharedOne())
.pipe(sharedTwo())
.pipe(sharedThree())
.pipe(gulp.fork(function(a, b) {
return eventStream.merge(
a.pipe(aOne()).pipe(aTwo()),
b.pipe(bOne()).pipe(bTwo())
);
}));
I’m sorry if I don’t make any sense or if there is already a known stream utility like this but as I sad I’m relatively new to this.
Any help would be much appreciated.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:30 (7 by maintainers)
Top Results From Across the Web
Passing a stream between two gulp tasks? - Stack Overflow
Very common pattern in gulp builds. patterns are gathered into a single paths variable; each task begins with a "src" plugin (very often...
Read more >Node.js v19.3.0 Documentation
Creates and returns a new Blob containing a subset of this Blob objects data. The original Blob is not altered. blob.stream() #. Added...
Read more >Writing my own build system: Coupling gulp concepts with ...
It's a nice concept in theory: something generates a stream of files, and one can add various processors to manipulate the stream and...
Read more >@dash14/svg-pan-zoom - npm
JavaScript library for panning and zooming an SVG image from the mouse, touches and programmatically.. Latest version: 3.6.9, last published: 3 months ago....
Read more >Node.js Interview Questions Examples With The Answers
js programming interview questions about work experience, focus on hands-on experience rather than theoretical education. That is, prioritize ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
gulp-clone
gulp-mirror
–edit
Fixed gulp-mirror example (maybe)
A repository with a README containing known and useful streaming modules would be awesome… It’s so hard to find the right terminology for such abstract problems.