UNPKG

@vnxjs/service

Version:
66 lines (56 loc) 1.28 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 type Func = (...args: any[]) => any export type IPluginsObject = Record<string, Record<any, any> | null> export interface IPlugin { id: string path: string opts: any type: PluginType apply: Func } export 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 }