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

event-stream or merge-stream? #6

Open
cognitom opened this issue Jul 6, 2014 · 3 comments
Open

event-stream or merge-stream? #6

cognitom opened this issue Jul 6, 2014 · 3 comments
Labels

Comments

@cognitom
Copy link
Member

cognitom commented Jul 6, 2014

In this cheatsheet the two modules are used, but basically es.concat and merge has a same functionality. merge-stream seems my favorite because of readability, like below.

var merge = require('merge-stream');
gulp.task('hello', function(){
  return merge(stream1, stream2);
});

Here's some difference between these.

@cognitom
Copy link
Member Author

cognitom commented Jul 6, 2014

Related to this, I've sent a PR.
grncdr/merge-stream#5

@cognitom
Copy link
Member Author

cognitom commented Jul 6, 2014

The PR has been accepted, so from now on we can use merge(tasks) instead of merge.apply(null, tasks). It seems an advantage of merge-stream.

var gulp = require('gulp');
var merge = require('merge-stream');

gulp.task('css', function(){
  var tasks = [/* some tasks */];
  return merge(tasks);
});

I'd like to change the code of Stream Array to use merge-stream. Is there any objection, or suggestion?

@cognitom
Copy link
Member Author

cognitom commented Jul 7, 2014

I've found another option stream-combiner, hmm.
https://github.com/dominictarr/stream-combiner

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

No branches or pull requests

1 participant