0.5.0 • Published 3 years ago

@diagrams-ts/graphviz-cli-renderer v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

GraphViz-CLI-Renderer

Thin nodejs wrapper for the dotcommand line interface installed with the graphviz package. Renders a string containing valid dot syntax to an image output.

Installation and Requirements

In order to create svg, png or webp output you'll need to install graphviz. This package expects dot cli of graphviz to be available in your path. You can check this by running:

dot -v

Install this package by running:

npm install @diagrams-ts/graphviz-cli-renderer

# or when using yarn

yarn add @diagrams-ts/graphviz-cli-renderer

Usage

import { CliRenderer } from "@diagrams-ts/graphviz-cli-renderer";

const render = CliRenderer({ outputFile: "./example.png", format: "png" });

(async () => {
  try {
    await render(
      `digraph G {
        a1 -> b2;
        a1 -> b3
    }`
    );
  } catch (error) {
    console.log(error);
  }
})();
0.3.10

3 years ago

0.1.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.5.0

3 years ago

0.3.2

3 years ago

0.4.0

3 years ago

0.3.4

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago