1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import { Argv as Yargs } from 'yargs';
import { Plugin } from '../lib/Plugin';
import { BabelRC } from '../config/babel';
export declare type Env = 'production' | 'development';
export declare type ThemeConfig = Record<string, any>;
export interface DocgenConfig {
handlers?: any[];
resolver?: (ast: any, recast: any) => any;
propFilter?: (prop: any) => boolean;
searchPath: string;
}
export interface Menu {
name: string;
route?: string;
href?: string;
menu?: Menu[];
}
export interface HtmlContext {
lang: string;
favicon?: string;
head?: {
meta: any[];
links: any[];
raw: string;
scripts: any[];
};
body?: {
raw: string;
scripts: any[];
};
}
export interface Argv {
base: string;
src: string;
files: string | string[];
ignore: string[];
watchIgnore: string;
public: string;
dest: string;
editBranch: string;
config: string;
debug: boolean;
clearConsole: boolean;
typescript: boolean;
propsParser: boolean;
host: string;
port: number;
websocketPort: number;
websocketHost: string;
native: boolean;
codeSandbox: boolean;
sourcemaps: boolean;
notUseSpecifiers: boolean;
title: string;
description: string;
theme: string;
wrapper?: string;
indexHtml?: string;
/** slugify separator */
separator: string;
}
export interface Config extends Argv {
paths: Record<string, any>;
plugins: Plugin[];
mdPlugins: any[];
hastPlugins: any[];
menu: Menu[];
htmlContext: HtmlContext;
themeConfig: ThemeConfig;
docgenConfig: DocgenConfig;
filterComponents: (files: string[]) => string[];
modifyBundlerConfig<C>(config: C, dev: boolean, args: Config): C;
modifyBabelRc(babelrc: BabelRC, args: Config): BabelRC;
onCreateWebpackChain<C>(c: C, dev: boolean, args: Config): void;
}
export declare const setArgs: (yargs: Yargs<{}>) => Yargs<{
base: any;
} & {
source: any;
} & {
files: any;
} & {
ignore: any;
} & {
public: any;
} & {
dest: any;
} & {
editBranch: any;
} & {
config: any;
} & {
title: any;
} & {
description: any;
} & {
theme: any;
} & {
typescript: any;
} & {
propsParser: any;
} & {
wrapper: any;
} & {
indexHtml: any;
} & {
debug: any;
} & {
clearConsole: any;
} & {
host: any;
} & {
port: any;
} & {
websocketHost: any;
} & {
websocketPort: any;
} & {
native: any;
} & {
codeSandbox: any;
} & {
sourcemaps: any;
} & {
separator: any;
} & {
open: boolean;
}>;