ligie
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

ligie generates mermaid-js diagrams (.md, .svg, .png) from basic graph structures.

    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:

    graph LR;

    a --> b
    a --> c
    a --> d
    c --> d

Package Sidebar

Install

npm i ligie

Weekly Downloads

6,018

Version

0.0.7

License

MIT

Unpacked Size

4.81 kB

Total Files

5

Last publish

Collaborators

  • antoine-coulon