本文整理汇总了TypeScript中@argdown/core.ArgdownApplication.run方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ArgdownApplication.run方法的具体用法?TypeScript ArgdownApplication.run怎么用?TypeScript ArgdownApplication.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@argdown/core.ArgdownApplication
的用法示例。
在下文中一共展示了ArgdownApplication.run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("sanity test", function() {
const source = `[T1]: Hello World`;
const result = app.run({
process: ["parse-input", "build-model", "export-symbols"],
input: source,
logLevel: "error"
});
expect(result.documentSymbols).to.exist;
expect(result.documentSymbols!.length).to.equal(1);
expect(result.documentSymbols![0].name).to.equal("[T1]");
});
示例2: VizJsMap
const createVizJsMap = (container: HTMLElement) => {
container.innerHTML = "";
const vizJsMap = new VizJsMap(container, "/full.render.js");
const response = app.run({
input: `
# G1
<a1>
- <a2>
`,
process: exportDot
});
vizJsMap.render({ dot: response.dot! });
};
示例3: DagreMap
const createDagreMap = (container: HTMLElement) => {
container.innerHTML = "";
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
svg.setAttribute("style", "width: 100%; height: 100%;");
container.appendChild(svg);
const dagreMap = new DagreMap(svg);
const response = app.run({
input: `
# G1
<a1>
- <a2>
`,
process: exportMap
});
dagreMap.render({ settings: {}, map: response.map!, tags: response.tags! });
};