Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timdp/swirly
A marble diagram generator.
https://github.com/timdp/swirly
documentation javascript marble-diagrams nodejs observable reactive-programming rxjs svg typescript
Last synced: 4 months ago
JSON representation
A marble diagram generator.
- Host: GitHub
- URL: https://github.com/timdp/swirly
- Owner: timdp
- License: mit
- Created: 2019-09-09T16:40:44.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-21T15:25:38.000Z (over 1 year ago)
- Last Synced: 2024-07-01T00:24:16.261Z (5 months ago)
- Topics: documentation, javascript, marble-diagrams, nodejs, observable, reactive-programming, rxjs, svg, typescript
- Language: TypeScript
- Homepage: https://swirly.dev
- Size: 5.41 MB
- Stars: 116
- Watchers: 3
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
A marble diagram generator.## Example
Here's Swirly rendering the effect of the `concatAll` operator:
![concatAll](examples/concatAll.png)
The image above was built from
[this marble diagram specification](examples/concatAll.txt).Diagram specifications use an extension of the syntax used for
[RxJS marble testing](https://github.com/ReactiveX/rxjs/blob/fc3d4264395d88887cae1df2de1b931964f3e684/docs_app/content/guide/testing/marble-testing.md).
Please consult the [examples](examples.md) to learn how to create diagrams.## Web Version
You can use Swirly in your browser at
[**swirly.dev**](https://swirly.dev/).The Web version allows you to edit diagram specifications in real time and
export them to an SVG or a PNG image.## CLI Version
Swirly is also available as a command-line utility. To run it, you need a
sufficiently recent version of [Node.js](https://nodejs.org/).To install Swirly on your machine, just install the `swirly` npm package:
```bash
npm install -g swirly
```Next, create `diagram.txt` with your diagram specification. Take a look at the
[examples](examples/) to learn about the expected syntax.You can then generate an SVG image from the specification by simply running:
```bash
swirly diagram.txt diagram.svg
```Swirly can also output PNG images. Since PNG is a raster image format, you may
want to increase the resolution to get a higher-quality result. You can do so by
passing `--scale` followed by a percentage. For example, this will render the
image at twice its original size:```bash
swirly --scale=200 diagram.txt diagram.png
```## Author
[Tim De Pauw](https://tmdpw.eu)
## License
MIT