Package

purescript-dotlang

Repository
csicar/purescript-dotlang
License
MIT
Uploaded by
csicar
Published on
2020-02-13

documentation can be found on pursuit

define your model like this:

DiGraph [
    node "a" [ Shape Diamond, Style Filled,  Node.FillColor red ],
    node "b" [],
    "a" ==> "b",
    "a" =*> "d" $ [ Edge.FillColor red ],
    Subgraph [
        node "d" []
    ]
]

can be rendered using toText to:

digraph {
    a [shape=diamond, style=filled, fillcolor="#f44336"];
    b [];
    a -> b;
    a -> d [fillcolor="#f44336"];
    subgraph {
        d []; 
    }
}

Installation

Spago

let additions = 
    { dotlang = 
        { dependencies = 
            [ "colors"
            , "console"
            , "effect"
            , "generics-rep"
            , "prelude"
            , "psci-support"
            , "strings"
            , "test-unit"
            ]
        , repo = "https://github.com/csicar/purescript-dotlang.git"
        , version = "v2.0.0"
        }
    }
spago install dotlang

Bower

bower i purescript-dotlang

v3.0.0

Breaking Changes:

  • Label of Edge and Node now support HTML and no formatting: To migrate replace old calls to Label with calls to label