markdown-code-example-inserter
Version:
Syncs code examples with markdown documentation.
36 lines (35 loc) • 915 B
TypeScript
/**
* Flag for setting a specific index file.
*
* @category Internals
*/
export declare const forceIndexTrigger = "--index";
/**
* All args for the CLI. This is automatically generated inside of {@link runCli} via
* {@link parseArgs}.
*
* @category Internals
*/
export type CliArgs = {
forceIndex: string | undefined;
silent: boolean;
checkOnly: boolean;
files: string[];
};
/**
* Parse all CLI args out of a raw CLI arg string.
*
* @category Internals
*/
export declare function parseArgs(rawArgs: ReadonlyArray<string>, filePath: string): Promise<CliArgs>;
/**
* Run the `md-code` CLI.
*
* @category Main
*/
export declare function runCli({ cwd, rawArgs, cliFilePath, }: Readonly<{
rawArgs: ReadonlyArray<string>;
cwd?: string;
/** The file that is executing the CLI script. Used to determine CLI argument positioning. */
cliFilePath?: string;
}>): Promise<void>;