Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoine-coulon/ligie
Ligie generates mermaid-js diagrams from Directed Graphs
https://github.com/antoine-coulon/ligie
Last synced: 14 days ago
JSON representation
Ligie generates mermaid-js diagrams from Directed Graphs
- Host: GitHub
- URL: https://github.com/antoine-coulon/ligie
- Owner: antoine-coulon
- License: mit
- Created: 2022-10-10T20:42:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-27T19:27:20.000Z (about 2 years ago)
- Last Synced: 2024-10-09T10:06:25.309Z (about 1 month ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**ligie** generates [mermaid-js](https://github.com/mermaid-js/mermaid) diagrams (.md, .svg, .png) from basic graph structures.
```javascript
const graph = {
"a": ["b", "c", "d"];
"b": [],
"c": ["d"],
"d": []
};const outDir = process.cwd();
const mermaid = generateMermaid(graph, outDir, { orientation: "LR" });await mermaid.toMarkdown(); // 1.
await mermaid.toSvg(); // 2.
await mermaid.toPng(); // 3.
```For the 1), a markdown file will include a graph diagram:
```mermaid
graph LR;a --> b
a --> c
a --> d
c --> d
```