uiflows-parser
v1.0.1
Published
Parse a string of uiflows lang, return the string dot lang.
Downloads
4
Readme
uiflows-parser
ui-spec-mdのUI Flowsのコードブロックをパースする部分を抜き出したもの。
Usage
want this
sample script
const uiflowsParser = require( 'uiflows-parser' );
const uiflowsStr = `
[what the user sees]
what they do
==> what they see next
[what they see next]
what they do next
`;
uiflowsParser(uiflowsStr);
the return (dot lang)
digraph "" {
graph [ rankdir = "LR" ];
node [
fontsize = "16"
shape = "record"
tooltip = ""
];
edge [];
"node0" [
tooltip = ""
label = "
<port0> what the user sees
|
<port1> what they do
"
];
"node1" [
tooltip = ""
label = "
<port0> what they see next
|
<port1> what they do next
"
];
node0:port1 -> node1:port0;
}
would be to good pass the return to Viz.js.