1.0.4 • Published 4 years ago

whatthedot v1.0.4

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

WhAtThEdOt

A simple library for building dot (graphviz) files with javascript and typescript

Aim

My primary aim for this project is to build something fun while learning DOT on the way. And ofc just have fun with dot

Examples

Below are some examples of fun stuff you can do with dot

Ur average dot file

Code

digraph figureName {
    name -> thing;
    thing -> name;
}

Output:

npm.io

Example from the documentation

Code

digraph G {
    main -> parse -> execute;
    main -> init;
    main -> cleanup;
    execute -> make_string;
    execute -> printf;
    init -> make_string;
    main -> printf;
    execute -> compare;
}

Output:

npm.io

Export / Convert

Exporting can be done to pdf file format through the following command.

$ dot -Tpdf foo.dot -o foo.pdf

Extension

Allows you to open preview of your graph to the side

Links

DescriptionLink
The dot documentationhttps://graphviz.org/pdf/dotguide.pdf
VSCode Extensionhttps://marketplace.visualstudio.com/items?itemName=joaompinto.vscode-graphviz
1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago