Skip to content

Commit

Permalink
docs: update rstream-* readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Apr 25, 2018
1 parent 28cf39f commit cf388dd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions examples/rstream-dataflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ package.
- [@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/master/packages/rstream) - reactive stream constructs
- [@thi.ng/rstream-dot](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-dot) - GraphViz DOT output of graph topology
- [@thi.ng/rstream-gestures](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-gestures) - unified mouse & single-touch event stream
- [@thi.ng/rstream-graph](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-graph) - declarative dataflow graph creation
- [@thi.ng/transducers](https://github.com/thi-ng/umbrella/tree/master/packages/transducers) - data transformations (here used for stream transforms)

Please see detailed comments in the source code for further explanations.
14 changes: 8 additions & 6 deletions packages/rstream-dot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ This project is part of the

## About

Graphviz DOT conversion of @thi.ng/rstream dataflow graph topologies.
Graphviz DOT conversion of
[@thi.ng/rstream](https://github.com/thi-ng/umbrella/tree/master/packages/rstream)
dataflow graph topologies.

## Installation

Expand All @@ -23,15 +25,15 @@ import * as rsd from "@thi.ng/rstream-dot";
import * as rs from "@thi.ng/rstream";
import * as tx from "@thi.ng/transducers";

// create dummy dataflow
a = rs.fromIterable([1,2,3]);
b = rs.fromIterable([10, 20, 30]);

a.transform(tx.map((x)=> x*10), "x10");

rs.merge({src: [a,b]}).subscribe(rs.trace());
a.transform(tx.map((x) => x * 10), "x10");
rs.merge({src: [a, b]}).subscribe(rs.trace());

// now capture the topology by walking the graph from its root(s)
console.log(rsd.toDot(rsd.walk([a,b])));
// and convert the result to GraphViz DOT format
console.log(rsd.toDot(rsd.walk([a, b])));

// digraph g {
// rankdir=LR;
Expand Down
7 changes: 6 additions & 1 deletion packages/rstream-gestures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ yarn add @thi.ng/rstream-gestures

## Usage examples

A small, fully commented project can be found in the `/examples` folder:

[Source](https://github.com/thi-ng/umbrella/tree/master/examples/rstream-dataflow) |
[Live version](http://demo.thi.ng/umbrella/rstream-dataflow)

```typescript
import * as rsg from "@thi.ng/rstream-gestures";
import { gestureStream } from "@thi.ng/rstream-gestures";
```

## Authors
Expand Down
9 changes: 9 additions & 0 deletions packages/rstream-graph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ yarn add @thi.ng/rstream-graph

## Usage examples

A small, fully commented project can be found in the `/examples` folder:

[Source](https://github.com/thi-ng/umbrella/tree/master/examples/rstream-dataflow) |
[Live version](http://demo.thi.ng/umbrella/rstream-dataflow)

More basic:

```typescript
import { Atom } from "@thi.ng/atom";
import * as rs from "@thi.ng/rstream";
Expand Down Expand Up @@ -65,6 +72,8 @@ state.resetIn("a", 10);
// result: 360
```

Please documentation in the source code for further details.

## Authors

- Karsten Schmidt
Expand Down
2 changes: 1 addition & 1 deletion packages/rstream-query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ final subscriptions to output them to the console (using `trace`, see
above).

Btw. The diagram has been generated using
[@thi.ng/rstream-dot](https://github.com/thi-ng/umbrella/tree/master/packages/rstream)
[@thi.ng/rstream-dot](https://github.com/thi-ng/umbrella/tree/master/packages/rstream-dot)
and can be recreated by calling `store.toDot()` (for the above example)

(Many) more features forthcoming...
Expand Down

0 comments on commit cf388dd

Please sign in to comment.