Skip to content

Commit

Permalink
Improve a readme example (#235)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
ehmicky and sindresorhus committed May 12, 2019
1 parent e55dc8b commit 0f9fe8b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions readme.md
Expand Up @@ -327,15 +327,15 @@ Let's say you want to show the output of a child process in real-time while also

```js
const execa = require('execa');
const getStream = require('get-stream');

const stream = execa('echo', ['foo']).stdout;
const subprocess = execa('echo', ['foo']);

stream.pipe(process.stdout);
subprocess.stdout.pipe(process.stdout);

getStream(stream).then(value => {
console.log('child output:', value);
});
(async () => {
const {stdout} = await subprocess;
console.log('child output:', stdout);
})();
```


Expand Down

0 comments on commit 0f9fe8b

Please sign in to comment.