UNPKG

@vnxjs/service

Version:
57 lines (56 loc) 1.4 kB
import { PluginType } from './constants'; export interface IPaths { /** * Directory where the current command is executed,If that's the case... build Command is the current project path */ appPath: string; /** * Current Item Configuration Directory,If... init Command,There is no such path. */ configPath: string; /** * Current Project Source Path */ sourcePath: string; /** * Current project output code path */ outputPath: string; /** * Use for current item node_modules Path */ nodeModulesPath: string; } export declare type Func = (...args: any[]) => any; export declare type IPluginsObject = Record<string, Record<any, any> | null>; export interface IPlugin { id: string; path: string; opts: any; type: PluginType; apply: Func; } export declare type IPreset = IPlugin; export interface IHook { name: string; plugin?: string; fn: Func; before?: string; stage?: number; } export interface ICommand extends IHook { alias?: string; optionsMap?: { [key: string]: string; }; synopsisList?: string[]; } export interface IFileType { templ: string; style: string; script: string; config: string; } export interface IPlatform extends IHook { useConfigName?: string; }