How to use the @argdown/core.GroupPlugin 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-node / src / argdown.ts View on Github external
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",
  dataKey: "input",
  extension: ".argdown",
  isRequestData: true
});
github christianvoigt / argdown / packages / argdown-sandbox / src / store.js View on Github external
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");
app.addPlugin(new ClosedGroupPlugin(), "transform-closed-groups");
app.addPlugin(htmlExport, "export-html");