UNPKG

mdat

Version:

CLI tool and TypeScript library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.

47 lines (46 loc) 1.21 kB
import { helpStringToObject as helpStringToObjectMeow } from './meow'; import { helpStringToObject as helpStringToObjectYargs } from './yargs'; export type Command = { arguments?: string[]; commandName?: string; default?: boolean; description?: string; parentCommandName?: string; }; export type Positional = { arguments?: string[]; defaultValue?: string; description?: string; required?: boolean; type?: string; }; export type Option = { aliases?: string[]; arguments?: string[]; choices?: string[]; defaultValue?: string; description?: string; flags?: string[]; type?: string; }; export type ProgramInfo = { arguments?: string[]; commandName: string; commands?: Command[]; description?: string; options?: Option[]; positionals?: Positional[]; subcommandName?: string; }; declare const _default: { yargs: typeof helpStringToObjectYargs; meow: typeof helpStringToObjectMeow; }; export default _default; /** * Get the command and subcommand from a command string. */ export declare function getCommandParts(wholeCommand: string | undefined): { command: string; subcommand: string | undefined; };