{"action":"created","issue":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/905","labels_url":"https://api.github.com/repos/gulpjs/gulp/issues/905/labels{/name}","comments_url":"https://api.github.com/repos/gulpjs/gulp/issues/905/comments","events_url":"https://api.github.com/repos/gulpjs/gulp/issues/905/events","html_url":"https://github.com/gulpjs/gulp/issues/905","id":57730505,"number":905,"title":"Theoretical question about forking a stream in gulp","user":{"login":"gionkunz","id":2203704,"avatar_url":"https://avatars.githubusercontent.com/u/2203704?v=3","gravatar_id":"","url":"https://api.github.com/users/gionkunz","html_url":"https://github.com/gionkunz","followers_url":"https://api.github.com/users/gionkunz/followers","following_url":"https://api.github.com/users/gionkunz/following{/other_user}","gists_url":"https://api.github.com/users/gionkunz/gists{/gist_id}","starred_url":"https://api.github.com/users/gionkunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gionkunz/subscriptions","organizations_url":"https://api.github.com/users/gionkunz/orgs","repos_url":"https://api.github.com/users/gionkunz/repos","events_url":"https://api.github.com/users/gionkunz/events{/privacy}","received_events_url":"https://api.github.com/users/gionkunz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gulpjs/gulp/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-02-15T13:35:44Z","updated_at":"2015-02-15T16:46:27Z","closed_at":null,"body":"Hey 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.\r\n\r\nI'd think of something like this:\r\n```javascript\r\ngulp.src('./src/*.js')\r\n  .pipe(sharedOne())\r\n  .pipe(sharedTwo())\r\n  .pipe(sharedThree())\r\n  .pipe(gulp.fork(function(a, b) {\r\n    return eventStream.merge(\r\n      a.pipe(aOne()).pipe(aTwo()),\r\n      b.pipe(bOne()).pipe(bTwo())\r\n    );\r\n  }));\r\n```\r\n\r\nI'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.\r\n\r\nAny help would be much appreciated."},"comment":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/comments/74425000","html_url":"https://github.com/gulpjs/gulp/issues/905#issuecomment-74425000","issue_url":"https://api.github.com/repos/gulpjs/gulp/issues/905","id":74425000,"user":{"login":"gionkunz","id":2203704,"avatar_url":"https://avatars.githubusercontent.com/u/2203704?v=3","gravatar_id":"","url":"https://api.github.com/users/gionkunz","html_url":"https://github.com/gionkunz","followers_url":"https://api.github.com/users/gionkunz/followers","following_url":"https://api.github.com/users/gionkunz/following{/other_user}","gists_url":"https://api.github.com/users/gionkunz/gists{/gist_id}","starred_url":"https://api.github.com/users/gionkunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gionkunz/subscriptions","organizations_url":"https://api.github.com/users/gionkunz/orgs","repos_url":"https://api.github.com/users/gionkunz/repos","events_url":"https://api.github.com/users/gionkunz/events{/privacy}","received_events_url":"https://api.github.com/users/gionkunz/received_events","type":"User","site_admin":false},"created_at":"2015-02-15T16:46:27Z","updated_at":"2015-02-15T16:46:27Z","body":"@popomore , Yes!! :-) Thats it I believe. Why do you instruct to do `npm install gulp-mirror -g` ?"}}