Description
We need to think through the ideal API for this and #20 as well, but something like:
execa('./cli', [], {
transforms: {
// shortcut to a built-in transform we provide
stdout: 'line',
stderr: through2(function (chunk, encoding, callback) {
// custom processing here
})
}
}).then(function (result) {
result.stdout;
// => an array of lines
result.stderr;
// => an array of whatever the custom transform emits
});