UNPKG

1.41 kBTypeScriptView Raw
1import program from 'commander';
2import { PkgConf } from './lib/config';
3export declare class App {
4 /**
5 * program
6 */
7 protected readonly program: program.CommanderStatic;
8 /**
9 * user configurations
10 */
11 protected conf: PkgConf;
12 /**
13 * plugin's name
14 */
15 protected plugins: any[];
16 constructor();
17 /**
18 * is plugin folder
19 */
20 private isPluginFolder;
21 /**
22 * add plugin
23 * @param pluginName plugin name
24 * @param cwd plugin cwd
25 */
26 private addPlugin;
27 /**
28 * load local plugins defined by user
29 * @param dir dir for local plugins
30 */
31 private loadPluginsByDir;
32 /**
33 * load ./plugins
34 */
35 private loadUserLocalPlugins;
36 /**
37 * loading plugins which install it as a dependence in package.json
38 */
39 private loadPlugins;
40 private loadGlobalPlugins;
41 /**
42 * install plugins the order is:
43 * - user local plugins
44 * - system local plugins
45 * - plugins
46 */
47 install(): Promise<void>;
48 /**
49 * run a plugin immediately
50 * @param plugin local plugin for debug
51 * - ./path/to/plugin-entry
52 * - /path/to/plugin-entry
53 * - merry-plugin-awesome-plugin
54 * @param options
55 */
56 private debug;
57 /**
58 * install plugins and run
59 */
60 run(): Promise<void>;
61}
62declare const _default: App;
63export default _default;