install gulp to process code
This commit is contained in:
parent
24f6606c2c
commit
b6a3900ee2
1651 changed files with 253427 additions and 39 deletions
15
node_modules/collect-stream/index.js
generated
vendored
Normal file
15
node_modules/collect-stream/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { default as concat } from 'concat-stream';
|
||||
import { default as once } from 'once';
|
||||
|
||||
export default function collect(stream, opts, fn) {
|
||||
if (typeof opts === 'function') {
|
||||
fn = opts;
|
||||
opts = {};
|
||||
}
|
||||
fn = once(fn);
|
||||
stream.on('error', fn);
|
||||
stream.pipe(concat(opts, data => {
|
||||
fn(null, data);
|
||||
}));
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue