Add option to compile markdown

This commit is contained in:
Endeavorance 2025-03-21 14:58:26 -04:00
parent e7218143ec
commit c1f3c6cade
7 changed files with 62 additions and 237 deletions

View file

@ -16,6 +16,7 @@ Options:
--outfile, -o Specify the output file path. If not specified, output to stdout
--watch, -w Watch the directory for changes and recompile
--renderer, -r Specify the output renderer. Options: json, html
--markdown Compile markdown in descriptions when rendering to JSON
--help, -h Show this help message
`.trim();
@ -35,6 +36,7 @@ export interface CLIArguments {
help: boolean;
renderer: Renderer;
watch: boolean;
markdown: boolean;
};
}
@ -74,6 +76,10 @@ export function parseCLIArguments(argv: string[]): CLIArguments {
default: false,
type: "boolean",
},
markdown: {
default: false,
type: "boolean",
},
},
strict: true,
allowPositionals: true,
@ -99,6 +105,7 @@ export function parseCLIArguments(argv: string[]): CLIArguments {
help: options.help,
renderer: parsedRenderer.data,
watch: options.watch,
markdown: options.markdown,
},
};
}