Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const merge = require('merge-stream');
- const stream = merge();
- configs.forEach(conf => {
- stream.add(exec(conf.input));
- // exec is essentially pipes vfs.src() through custom plugin
- });
- stream.pipe(through2.obj((file, encoding, cb) => {
- if (!file.isNull()) {
- const relativePath = file.path.replace(process.cwd() + '/', '');
- process.stdout.cursorTo(0);
- process.stdout.write(chalk.green(`Writing ${relativePath}`));
- process.stdout.clearLine(1);
- }
- cb();
- }));
Add Comment
Please, Sign In to add comment