Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
StatementSelectionMode,
LabelMode,
tokensToString,
astToString,
GraphMLExportPlugin
} from "@argdown/core";
import axios from "axios";
const app = new ArgdownApplication();
const parserPlugin = new ParserPlugin();
const dataPlugin = new DataPlugin();
const modelPlugin = new ModelPlugin();
const regroupPlugin = new RegroupPlugin();
const colorPlugin = new ColorPlugin();
const htmlExport = new HtmlExportPlugin({
headless: true
});
const jsonExport = new JSONExportPlugin({ removeEmbeddedRelations: true });
const preselectionPlugin = new PreselectionPlugin();
const statementSelectionPlugin = new StatementSelectionPlugin();
const argumentSelectionPlugin = new ArgumentSelectionPlugin();
const mapPlugin = new MapPlugin();
const groupPlugin = new GroupPlugin();
const dotExport = new DotExportPlugin();
const graphMLExport = new GraphMLExportPlugin();
import primer from "!!raw-loader!../public/examples/argdown-primer.argdown";
app.addPlugin(parserPlugin, "parse-input");
app.addPlugin(dataPlugin, "build-model");
app.addPlugin(modelPlugin, "build-model");
app.addPlugin(regroupPlugin, "build-model");
argdown.addPlugin(colorPlugin, "colorize");
const stdoutArgdown = new StdOutPlugin({
dataKey: "input",
isRequestData: true
});
argdown.addPlugin(stdoutArgdown, "stdout-argdown");
const saveAsArgdown = new SaveAsFilePlugin({
outputDir: "./compiled",
dataKey: "input",
extension: ".argdown",
isRequestData: true
});
argdown.addPlugin(saveAsArgdown, "save-as-argdown");
const htmlExport = new HtmlExportPlugin();
argdown.addPlugin(htmlExport, "export-html");
const copyDefaultCss = new CopyDefaultCssPlugin();
argdown.addPlugin(copyDefaultCss, "copy-default-css");
const saveAsHtml = new SaveAsFilePlugin({
outputDir: "./html",
dataKey: "html",
extension: ".html"
});
argdown.addPlugin(saveAsHtml, "save-as-html");
const stdoutHtml = new StdOutPlugin({ dataKey: "html" });
argdown.addPlugin(stdoutHtml, "stdout-html");
const jsonExport = new JSONExportPlugin();
argdown.addPlugin(jsonExport, "export-json");
const saveAsJSON = new SaveAsFilePlugin({
outputDir: "./json",