]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/env node | |
2 | ||
3 | 'use strict'; | |
4 | ||
5 | const GraphvizToGrafn = require('..'); | |
6 | ||
7 | const stdin = process.stdin; | |
8 | let graphvizSource = ''; | |
9 | ||
10 | stdin.setEncoding('utf8'); | |
11 | ||
12 | stdin.on('data', function (chunk) { | |
13 | ||
14 | graphvizSource += chunk; | |
15 | }); | |
16 | ||
17 | stdin.on('end', function () { | |
18 | ||
19 | console.log(GraphvizToGrafn(graphvizSource)); | |
20 | }); | |
21 | ||
22 | stdin.on('error', console.error); |