Skip to content

Commit

Permalink
Add notes about Observables libraries (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
kostasx authored and SamVerschueren committed Nov 17, 2018
1 parent 2856259 commit 6d19ba7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions readme.md
Expand Up @@ -120,6 +120,8 @@ A `task` can also return an `Observable`. The thing about observables is that it
task. Please note that only the last line of the output is rendered.

```js
const {Observable} = require('rxjs');

const tasks = new Listr([
{
title: 'Success',
Expand All @@ -144,6 +146,8 @@ const tasks = new Listr([
]);
```

You can use the `Observable` package you feel most comfortable with, like [RxJS](https://www.npmjs.com/package/rxjs) or [zen-observable](https://www.npmjs.com/package/zen-observable).

### Streams

It's also possible to return a [`ReadableStream`](https://nodejs.org/api/stream.html#stream_class_stream_readable). The stream will be converted to an `Observable` and handled as such.
Expand Down

0 comments on commit 6d19ba7

Please sign in to comment.