UNPKG

@freephoenix888/generate-usage-ways-of-npm-cli-apps-in-markdown-format

Version:

Generates usage ways of CLI applications of npm package in markdown format

62 lines (61 loc) 1.76 kB
export interface BaseOutputOptions { /** * Path of the file to write the table of contents to */ filePath: string; } export interface WriteModeOptions { /** * Write mode for the output */ writeMode: 'overwrite' | 'append' | 'replace-placeholder'; } export interface OutputOptionsWithoutPlaceholder extends BaseOutputOptions, WriteModeOptions { writeMode: 'overwrite' | 'append'; } export interface Placeholder { /** * Start of the placeholder text */ start: string; /** * End of the placeholder text */ end: string; } export interface OutputOptionsWithPlaceholder extends BaseOutputOptions, WriteModeOptions { writeMode: 'replace-placeholder'; placeholder: Placeholder; } export type OutputOptions = OutputOptionsWithoutPlaceholder | OutputOptionsWithPlaceholder; export interface GenerateUsageWaysOfNpmCliAppsInMarkdownFormatOptions { /** * Name of the package * * @defaultValue * Name of the package in the current directory */ packageName?: string; /** * Names of the CLI utilities * * @defaultValue * Keys of the bin property of package.json in the current directory */ cliUtilityNames?: Array<string>; /** * Header level of the root header. Example: If you want generated headers to have 4 hashes, then specify 4 here * * @defaultValue * 3 */ rootHeaderLevel?: number; /** * Output options */ output?: OutputOptions; } /** * Generates usage ways of CLI applications of npm package in markdown format */ export declare function generateUsageWaysOfNpmCliAppsInMarkdownFormat(options: GenerateUsageWaysOfNpmCliAppsInMarkdownFormatOptions): Promise<string>;