Skip to content

Commit 988c2ac

Browse files
committed
pass options correctly
1 parent 605263d commit 988c2ac

File tree

1 file changed

+5
-1
lines changed
  • src/command/dev-call/make-ast-diagram

1 file changed

+5
-1
lines changed

src/command/dev-call/make-ast-diagram/cmd.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ import { execProcess } from "../../../core/process.ts";
1212
export const makeAstDiagramCommand = new Command()
1313
.name("make-ast-diagram")
1414
.hidden()
15+
.option("-m, --mode <mode:string>", "Diagram mode (default: full)")
1516
.arguments("<arguments...>")
1617
.description(
1718
"Creates a diagram of the Pandoc AST.\n\n",
1819
)
19-
.action(async (_options: unknown, ...args: string[]) => {
20+
//deno-lint-ignore no-explicit-any
21+
.action(async (options: any, ...args: string[]) => {
2022
const renderOpts = {
2123
cmd: Deno.execPath(),
2224
args: [
@@ -26,6 +28,8 @@ export const makeAstDiagramCommand = new Command()
2628
"--allow-run",
2729
resourcePath(join("tools", "ast-diagram", "main.ts")),
2830
...args,
31+
"--mode",
32+
options.mode || "full",
2933
],
3034
};
3135
await execProcess(renderOpts);

0 commit comments

Comments
 (0)