Generating Documentation

For generating the state diagram, we now add some more options to the generate function:

generateGraphLight :: Effect Unit
generateGraphLight = do
  let
    graph :: GraphvizGraph
    graph = TransitGraphviz.generate doorPinTransit \cfg -> cfg
      { theme = themeHarmonyLight
      , entryPoints = [ "DoorOpen" ]
      , layout = Landscape
      }

  FS.writeTextFile UTF8 "renders/door-pin_graph-light.dot" (Graphviz.toDotStr graph)

🗎 test/Examples/DoorPin.purs L103-L113

Generated Output: This creates the state diagram we saw earlier in this example.
🔗 View diagram on GraphvizOnline

The generation of the transition table works exactly the same as in the previous example.

↑ Back to top