UNPKG

@argdown/node

Version:

Async Argdown application for node.js

16 lines 595 B
import { SyncDotToSvgExportPlugin } from "@argdown/core"; import { Graphviz } from "@hpcc-js/wasm-graphviz"; export class AsyncSvgExportPlugin { syncPlugin; runAsync = async (request, response, logger) => { if (!this.syncPlugin) { const graphviz = await Graphviz.load(); this.syncPlugin = new SyncDotToSvgExportPlugin(graphviz); } this.prepare = this.syncPlugin.prepare; return this.syncPlugin.run(request, response, logger); }; prepare; name = "AsyncSvgExportPlugin"; } //# sourceMappingURL=AsyncSvgExportPlugin.js.map