Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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");
app.addPlugin(colorPlugin, "colorize");
app.addPlugin(preselectionPlugin, "build-map");
app.addPlugin(statementSelectionPlugin, "build-map");
app.addPlugin(argumentSelectionPlugin, "build-map");
app.addPlugin(mapPlugin, "build-map");
app.addPlugin(groupPlugin, "build-map");
const parserPlugin = new ParserPlugin();
argdown.addPlugin(parserPlugin, "parse-input");
const logParserErrorsPlugin = new LogParserErrorsPlugin();
argdown.addPlugin(logParserErrorsPlugin, "log-parser-errors");
const dataPlugin = new DataPlugin();
argdown.addPlugin(dataPlugin, "build-model");
const modelPlugin = new ModelPlugin();
argdown.addPlugin(modelPlugin, "build-model");
const regroupPlugin = new RegroupPlugin();
argdown.addPlugin(regroupPlugin, "build-model");
const preselectionPlugin = new PreselectionPlugin();
argdown.addPlugin(preselectionPlugin, "build-map");
const statementSelectionPlugin = new StatementSelectionPlugin();
argdown.addPlugin(statementSelectionPlugin, "build-map");
const argumentSelectionPlugin = new ArgumentSelectionPlugin();
argdown.addPlugin(argumentSelectionPlugin, "build-map");
const mapPlugin = new MapPlugin();
argdown.addPlugin(mapPlugin, "build-map");
const groupPlugin = new GroupPlugin();
argdown.addPlugin(groupPlugin, "build-map");
const colorPlugin = new ColorPlugin();
argdown.addPlugin(new ClosedGroupPlugin(), "transform-closed-groups");
argdown.addPlugin(colorPlugin, "colorize");
const stdoutArgdown = new StdOutPlugin({
dataKey: "input",
isRequestData: true
});
argdown.addPlugin(stdoutArgdown, "stdout-argdown");
const saveAsArgdown = new SaveAsFilePlugin({
outputDir: "./compiled",