How to use the @argdown/core.DataPlugin function in @argdown/core

To help you get started, we’ve selected a few @argdown/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github christianvoigt / argdown / packages / argdown-sandbox / src / store.js View on Github external
StatementSelectionPlugin,
  ArgumentSelectionPlugin,
  MapPlugin,
  GroupPlugin,
  DotExportPlugin,
  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";
github christianvoigt / argdown / packages / argdown-node / src / argdown.ts View on Github external
import { StdOutPlugin } from "./plugins/StdOutPlugin";
import { IncludePlugin } from "./plugins/IncludePlugin";
import { LoadFilePlugin } from "./plugins/LoadFilePlugin";

export const argdown = new AsyncArgdownApplication();

const loadFilePlugin = new LoadFilePlugin();
argdown.addPlugin(loadFilePlugin, "load-file");
const includePlugin = new IncludePlugin();
argdown.addPlugin(includePlugin, "load-file");

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");