| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 2x 2x 2x 12x 2x 2x 1x 12x | 'use strict';
const chalk = require('chalk');
const { Writable } = require('stream');
module.exports = (path, color, task) => {
const stream = new Writable({
write: chunk => {
const log = chunk.toString();
if (log.indexOf('Serverless') > -1) {
task.output = `${chalk[color](`[${path}]`)} ${log}`;
}
}
});
return stream;
};
|