yargs-file-commands
Version:
A yargs helper function that lets you define your commands structure via directory and file naming conventions.
16 lines (15 loc) • 504 B
TypeScript
import type { CommandModule } from 'yargs';
/**
* Represents a command structure with its file path and module information
* @interface Command
*/
export interface Command {
/** Full file system path to the command file */
fullPath: string;
/** Array of path segments representing the command hierarchy */
segments: string[];
/** The Yargs command module implementation */
commandModule: CommandModule;
/** Whether this is the default command */
isDefault?: boolean;
}