mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-19 18:36:24 -07:00
chore: install cssbundling rails and set up compilation
This commit is contained in:
parent
09ab4d214e
commit
99ef1cb2c8
4670 changed files with 393937 additions and 25 deletions
39
spec/dummy/node_modules/@sindresorhus/merge-streams/index.js
generated
vendored
Normal file
39
spec/dummy/node_modules/@sindresorhus/merge-streams/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import {PassThrough as PassThroughStream} from 'node:stream';
|
||||
|
||||
export default function mergeStreams(streams) {
|
||||
if (!Array.isArray(streams)) {
|
||||
throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
|
||||
}
|
||||
|
||||
const passThroughStream = new PassThroughStream({objectMode: true});
|
||||
passThroughStream.setMaxListeners(Number.POSITIVE_INFINITY);
|
||||
|
||||
if (streams.length === 0) {
|
||||
passThroughStream.end();
|
||||
return passThroughStream;
|
||||
}
|
||||
|
||||
let activeStreams = streams.length;
|
||||
|
||||
for (const stream of streams) {
|
||||
if (!(typeof stream?.pipe === 'function')) {
|
||||
throw new TypeError(`Expected a stream, got: \`${typeof stream}\`.`);
|
||||
}
|
||||
|
||||
stream.pipe(passThroughStream, {end: false});
|
||||
|
||||
stream.on('end', () => {
|
||||
activeStreams--;
|
||||
|
||||
if (activeStreams === 0) {
|
||||
passThroughStream.end();
|
||||
}
|
||||
});
|
||||
|
||||
stream.on('error', error => {
|
||||
passThroughStream.emit('error', error);
|
||||
});
|
||||
}
|
||||
|
||||
return passThroughStream;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue