forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.ts
199 lines (197 loc) · 6.08 KB
/
babel.ts
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
// Autogenerated using https://github.com/fedeci/commander-to-fig
const completionSpec: Fig.Spec = {
name: "babel",
icon: "https://raw.githubusercontent.com/babel/logo/master/babel.png",
options: [
{
name: ["-f", "--filename"],
description:
"The filename to use when reading from stdin. This will be used in source-maps, errors etc",
args: { name: "filename" },
},
{
name: "--presets",
description: "A comma-separated list of preset names",
args: { name: "list" },
},
{
name: "--plugins",
description: "A comma-separated list of plugin names",
args: { name: "list" },
},
{
name: "--config-file",
description: "Path to a .babelrc file to use",
args: { name: "path", template: "filepaths" },
},
{
name: "--env-name",
description:
"The name of the 'env' to use when loading configs and plugins. Defaults to the value of BABEL_ENV, or else NODE_ENV, or else 'development'",
args: { name: "env", suggestions: ["production", "development"] },
},
{
name: "--root-mode",
description: "The project-root resolution mode",
args: {
name: "mode",
suggestions: [
{
name: "root",
description: 'Passes the "root" value through as unchanged',
},
{
name: "upward",
description:
'Walks upward from the "root" directory, looking for a directory containing a babel.config.json file, and throws an error if a babel.config.json is not found',
},
{
name: "upward-optional",
description:
'Walk upward from the "root" directory, looking for a directory containing a babel.config.json file, and falls back to "root" if a babel.config.json is not found',
},
],
default: "root",
},
},
{
name: "--source-type",
args: { name: "type", suggestions: ["script", "module"] },
},
{
name: "--no-babelrc",
description: "Whether or not to look up .babelrc and .babelignore files",
},
{
name: "--ignore",
description: "List of glob paths to **not** compile",
args: { name: "list" },
},
{
name: "--only",
description: "List of glob paths to **only** compile",
args: { name: "list" },
},
{
name: "--no-highlight-code",
description: "Enable or disable ANSI syntax highlighting of code frames",
},
{
name: "--no-comments",
description: "Write comments to generated output",
},
{
name: "--retain-lines",
description: "Retain line numbers. This will result in really ugly code",
},
{
name: "--compact",
description:
"Do not include superfluous whitespace characters and line terminators",
args: { name: "mode", suggestions: ["true", "false", "auto"] },
},
{
name: "--minified",
description: "Save as many bytes when printing. (false by default)",
},
{
name: "--auxiliary-comment-before",
description: "Print a comment before any injected non-user code",
args: { name: "comment" },
},
{
name: "--auxiliary-comment-after",
description: "Print a comment after any injected non-user code",
args: { name: "comment" },
},
{
name: ["-s", "--source-maps"],
args: { name: "mode", suggestions: ["true", "false", "inline", "both"] },
},
{
name: "--source-map-target",
description: "Set `file` on returned source map",
args: { name: "string" },
},
{
name: "--source-file-name",
description: "Set `sources[0]` on returned source map",
args: { name: "string" },
},
{
name: "--source-root",
description: "The root from which all sources are relative",
args: { name: "filename" },
},
{
name: ["-x", "--extensions"],
description:
"Comma separated list of extensions to compile when a directory has been the input. [js,ts,jsx,tsx]",
args: { name: "extensions" },
},
{
name: "--keep-file-extension",
description: "Preserve the file extensions of the input files",
},
{ name: ["-w", "--watch"], description: "Recompile files on changes" },
{
name: "--skip-initial-build",
description: "Do not compile files before watching",
},
{
name: ["-o", "--out-file"],
description: "Compile all input files into a single file",
args: { name: "file", template: "filepaths" },
},
{
name: ["-d", "--out-dir"],
description:
"Compile an input directory of modules into an output directory",
args: { name: "directory", template: "folders" },
},
{
name: "--relative",
description:
"Compile into an output directory relative to input directory or file",
dependsOn: ["--out-dir"],
},
{
name: ["-D", "--copy-files"],
description: "When compiling a directory copy over non-compilable files",
},
{
name: "--include-dotfiles",
description:
"Include dotfiles when compiling and copying non-compilable files",
},
{
name: "--no-copy-ignored",
description: "Exclude ignored files when copying non-compilable files",
},
{
name: "--verbose",
description: "Log everything. This option conflicts with --quiet",
exclusiveOn: ["--quiet"],
},
{
name: "--quiet",
description: "Don't log anything. This option conflicts with --verbose",
exclusiveOn: ["--verbose"],
},
{
name: "--delete-dir-on-start",
description: "Delete the out directory before compilation",
},
{
name: "--out-file-extension",
description: "Use a specific extension for the output files",
args: {
name: "extension",
suggestions: [".es6", ".js", ".es", ".jsx", ".mjs"],
},
},
{ name: ["-V", "--version"], description: "Output the version number" },
{ name: ["-h", "--help"], description: "Output usage information" },
],
};
export default completionSpec;