mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-14 13:55:40 +00:00
14 lines
310 B
JavaScript
14 lines
310 B
JavaScript
import { Graphviz } from "@hpcc-js/wasm/graphviz";
|
|
|
|
const graphviz = await Graphviz.load();
|
|
|
|
const inputFile = [];
|
|
for await (const chunk of process.stdin) {
|
|
inputFile.push(chunk);
|
|
}
|
|
|
|
const file = Buffer.concat(inputFile).toString("utf-8");
|
|
|
|
const svg = graphviz.dot(file, "svg");
|
|
process.stdout.write(svg);
|