polotek/procstreams — Issue #1: Streaming stdout and stderr
Author: indexzero
Created: 2012-01-14 11:00:04+00:00
State: open

I noticed in the docs that you expose a collected `.data()` function in `procstream`, but is it possible to stream the data as it comes through? Something like:

``` js
var $p = require('procstreams');

$p('mkdir foo')
.and('cp file.txt foo/')
.and('rm file.txt')
.stdout.on('data', function (data) { /* inspect the output and perform some kind of expectation */ })
.stderr.on('data', function (data) { /* inspect the output and perform some kind of expectation */ })
.on('exit', function() {
console.log('done');
});
```

This would be really useful for an integration with something like [nexpect](https://github.com/nodejitsu/nexpect).