-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
/
config.js
208 lines (171 loc) 路 3.97 KB
/
config.js
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
/* eslint max-len: 0 */
module.exports = {
filename: {
type: "filename",
description: "filename to use when reading from stdin - this will be used in source-maps, errors etc",
default: "unknown",
shorthand: "f"
},
filenameRelative: {
hidden: true,
type: "string"
},
inputSourceMap: {
hidden: true
},
env: {
hidden: true,
default: {}
},
mode: {
description: "",
hidden: true
},
retainLines: {
type: "boolean",
default: false,
description: "retain line numbers - will result in really ugly code"
},
highlightCode: {
description: "enable/disable ANSI syntax highlighting of code frames (on by default)",
type: "boolean",
default: true
},
suppressDeprecationMessages: {
type: "boolean",
default: false,
hidden: true
},
presets: {
type: "list",
description: "",
default: []
},
plugins: {
type: "list",
default: [],
description: ""
},
ignore: {
type: "list",
description: "list of glob paths to **not** compile",
default: []
},
only: {
type: "list",
description: "list of glob paths to **only** compile"
},
code: {
hidden: true,
default: true,
type: "boolean"
},
metadata: {
hidden: true,
default: true,
type: "boolean"
},
ast: {
hidden: true,
default: true,
type: "boolean"
},
extends: {
type: "string",
hidden: true
},
comments: {
type: "boolean",
default: true,
description: "write comments to generated output (true by default)"
},
shouldPrintComment: {
hidden: true,
description: "optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"
},
compact: {
type: "booleanString",
default: "auto",
description: "do not include superfluous whitespace characters and line terminators [true|false|auto]"
},
minified: {
type: "boolean",
default: false,
description: "save as much bytes when printing [true|false]"
},
sourceMap: {
alias: "sourceMaps",
hidden: true
},
sourceMaps: {
type: "booleanString",
description: "[true|false|inline]",
default: false,
shorthand: "s"
},
sourceMapTarget: {
type: "string",
description: "set `file` on returned source map"
},
sourceFileName: {
type: "string",
description: "set `sources[0]` on returned source map"
},
sourceRoot: {
type: "filename",
description: "the root from which all sources are relative"
},
babelrc: {
description: "Whether or not to look up .babelrc and .babelignore files",
type: "boolean",
default: true
},
sourceType: {
description: "",
default: "module"
},
auxiliaryCommentBefore: {
type: "string",
description: "print a comment before any injected non-user code"
},
auxiliaryCommentAfter: {
type: "string",
description: "print a comment after any injected non-user code"
},
resolveModuleSource: {
hidden: true
},
getModuleId: {
hidden: true
},
moduleRoot: {
type: "filename",
description: "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"
},
moduleIds: {
type: "boolean",
default: false,
shorthand: "M",
description: "insert an explicit id for modules"
},
moduleId: {
description: "specify a custom name for module ids",
type: "string"
},
passPerPreset: {
description: "Whether to spawn a traversal pass per a preset. By default all presets are merged.",
type: "boolean",
default: false,
hidden: true,
},
// Deprecate top level parserOpts
parserOpts: {
description: "Options to pass into the parser, or to change parsers (parserOpts.parser)",
default: false
},
// Deprecate top level generatorOpts
generatorOpts: {
description: "Options to pass into the generator, or to change generators (generatorOpts.generator)",
default: false
}
};