aboutsummaryrefslogtreecommitdiff
path: root/bin/g2g
blob: ed8e312d0ad0b8618f3af27d0fbb99124b25e975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env node

'use strict';

const GraphvizToGrafn = require('..');

const stdin = process.stdin;
let graphvizSource = '';

stdin.setEncoding('utf8');

stdin.on('data', function (chunk) {

  graphvizSource += chunk;
});

stdin.on('end', function () {

  console.log(GraphvizToGrafn(graphvizSource));
});

stdin.on('error', console.error);