@leanup/cli
Version:
This CLI brings along all required tools to serve, test and build multi framework SPAs
29 lines (28 loc) • 1.1 kB
TypeScript
import * as commander from 'commander';
import { CreateOps } from './interfaces';
export interface CommandOption {
flags: string;
description: string;
default?: string;
}
export interface CommandItem {
command: commander.Command;
actions: Function[];
}
export declare function getProjectName(namespace?: string): string;
export declare abstract class AbstractCLI {
private name;
private version;
private program;
private commands;
constructor(name: string, version: string);
parse(): void;
protected consoleLog(message: string, silent?: boolean): void;
addCommand(name: string, description: string, options: CommandOption[], action: Function): void;
private setDescriptionToCommand;
addOptionToCommand(name: string | string[], options: CommandOption[]): void;
addActionToCommand(name: string | string[], action: Function): void;
addFirstActionToCommand(name: string | string[], action: Function): void;
private spawnCommand;
protected copyAndPrint(folder: string, subfolder: string | undefined, options: CreateOps): void;
}