-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathargs.ts
311 lines (310 loc) · 8.87 KB
/
args.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
import chalk from "chalk";
export const allArgOptions = {
access: {
description: `(${chalk.cyanBright(
'"public" | "restricted"',
)}): Which ${chalk.cyanBright("npm publish --access")} to
release npm packages with (by default, "public")`,
docsSection: "optional",
type: "string",
},
author: {
description: `Username on npm to publish packages under (by
default, an existing npm author, or the currently logged in npm user, or
${chalk.cyanBright("owner.toLowerCase()")})`,
docsSection: "optional",
type: "string",
},
auto: {
description: `Whether to infer all options from files on disk.`,
docsSection: "optional",
type: "boolean",
},
base: {
description: `Whether to scaffold the repository with:
• everything: that comes with the template (${chalk.cyanBright.bold(
"recommended",
)})
• minimum: amounts of tooling, essentially opting out of everything
• prompt: for which portions to exclude`,
docsSection: "core",
type: "string",
},
"create-repository": {
description: `Whether to create a corresponding repository on github.com
(if it doesn't yet exist)`,
docsSection: "core",
type: "boolean",
},
description: {
description: `Sentence case description of the repository
(e.g. A quickstart-friendly TypeScript package with lots of great
repository tooling. ✨)`,
docsSection: "core",
type: "string",
},
directory: {
description: `Directory to create the repository in (by default, the same
name as the repository)`,
docsSection: "optional",
type: "string",
},
email: {
description: `Email address to be listed as the point of contact in docs
and packages (e.g. [email protected])`,
docsSection: "optional",
type: "string",
},
"email-github": {
description: `Optionally, may be provided to use different emails in ${chalk.cyanBright(
".md",
)}
files`,
docsSection: "optional",
type: "string",
},
"email-npm": {
description: `Optionally, may be provided to use different emails in
${chalk.cyanBright("package.json")}`,
docsSection: "optional",
type: "string",
},
"exclude-all-contributors": {
description: `Don't add all-contributors to track contributions
and display them in a README.md table.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-compliance": {
description: `Don't add a GitHub Actions workflow to verify that PRs match
an expected format.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-deprecation": {
description: `Don't use eslint-plugin-deprecation to report on usage
of code marked as ${chalk.cyanBright("@deprecated")}.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-jsdoc": {
description: `Don't use eslint-plugin-jsdoc to enforce good practices around
JSDoc comments.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-json": {
description: `Don't apply linting and sorting to ${chalk.cyanBright(
"*.json",
)}, and
${chalk.cyanBright("*.jsonc")} files.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-knip": {
description: `Don't add Knip to detect unused files, dependencies, and code
exports.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-md": {
description: `Don't apply linting to ${chalk.cyanBright("*.md")} files.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-package-json": {
description: `Don't add npm-package-json-lint to lint for
package.json correctness.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-packages": {
description: `Don't add a pnpm dedupe workflow to ensure packages
aren't duplicated unnecessarily.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-perfectionist": {
description: `Don't apply eslint-plugin-perfectionist to ensure
imports, keys, and so on are in sorted order.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-regex": {
description: `Don't add eslint-plugin-regex to enforce good practices around
regular expressions.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-spelling": {
description: `Don't add cspell to spell check against dictionaries
of known words.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-strict": {
description: `Don't augment the recommended logical lint rules with
typescript-eslint's strict config.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-stylistic": {
description: `Don't add stylistic rules such as typescript-eslint's
stylistic config.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-lint-yml": {
description: `Don't apply linting and sorting to ${chalk.cyanBright(
"*.yaml",
)} and ${chalk.cyanBright("*.yml")} files.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-releases": {
description: `Don't add release-it to generate changelogs, package bumps,
and publishes based on conventional commits.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-renovate": {
description: `Don't add a Renovate config to dependencies up-to-date with
PRs.`,
docsSection: "opt-out",
type: "boolean",
},
"exclude-tests": {
description: `Don't add Vitest tooling for fast unit tests, configured
with coverage tracking.`,
docsSection: "opt-out",
type: "boolean",
},
funding: {
description: `GitHub organization or username to mention in ${chalk.cyanBright(
"funding.yml",
)}
(by default, owner)`,
docsSection: "optional",
type: "string",
},
guide: {
description: `Link to a contribution guide to place at the top of the
development docs`,
docsSection: "optional",
type: "string",
},
"guide-title": {
description: `If ${chalk.cyanBright(
"--guide",
)} is provided or detected from an existing
DEVELOPMENT.md, the text title to place in the guide link`,
docsSection: "optional",
type: "string",
},
keywords: {
description: `Any number of keywords to include in ${chalk.cyanBright(
"package.json",
)} (by default,
none). This can be specified any number of times, like
${chalk.cyanBright('--keywords apple --keywords "banana cherry"')}`,
docsSection: "optional",
multiple: true,
type: "string",
},
logo: {
description: `Local image file in the repository to display near the top of
the README.md as a logo`,
docsSection: "optional",
type: "string",
},
"logo-alt": {
description: `If ${chalk.cyanBright(
"--logo",
)} is provided or detected from an existing README.md,
alt text that describes the image will be prompted for if not provided`,
docsSection: "optional",
type: "string",
},
mode: {
description: `Whether to:
• create: a new repository in a child directory
• initialize: a freshly repository in the current directory
• migrate: an existing repository in the current directory`,
docsSection: "core",
type: "string",
},
offline: {
description: `You can run ${chalk.cyanBright(
"create-typescript-app",
)} in an "offline" mode.
Doing so will:
• Enable ${chalk.cyanBright(
"--exclude-all-contributors-api",
)} and ${chalk.cyanBright("--skip-github-api")}
• Skip network calls when setting up contributors
• Run pnpm commands with pnpm's ${chalk.cyanBright("--offline")} mode`,
docsSection: "offline",
type: "boolean",
},
owner: {
description: `GitHub organization or user the repository is underneath
(e.g. JoshuaKGoldberg)`,
docsSection: "core",
type: "string",
},
"preserve-generated-form": {
description: `Whether to keep the GitHub repository generated from
notice (by default, false)`,
docsSection: "optional",
type: "boolean",
},
repository: {
description: `The kebab-case name of the repository
(e.g. create-typescript-app)`,
docsSection: "core",
type: "string",
},
"skip-all-contributors-api": {
description: `Skips network calls that fetch all-contributors data from
GitHub. This flag does nothing if ${chalk.cyanBright(
"--exclude-all-contributors",
)} was specified.`,
docsSection: "skip-net",
type: "boolean",
},
"skip-github-api": {
description: `Skips calling to GitHub APIs.`,
docsSection: "skip-net",
type: "boolean",
},
"skip-install": {
description: `Skips installing all the new template packages with pnpm.`,
docsSection: "skip-net",
type: "boolean",
},
"skip-removal": {
description: `Skips removing setup docs and scripts, including this ${chalk.cyanBright(
"docs/",
)}
directory`,
docsSection: "skip-disk",
type: "boolean",
},
"skip-restore": {
description: `Skips the prompt offering to restore the repository if an
error occurs during setup`,
docsSection: "skip-disk",
type: "boolean",
},
"skip-uninstall": {
description: `Skips uninstalling packages only used for setup scripts`,
docsSection: "skip-disk",
type: "boolean",
},
title: {
description: `Title Case title for the repository to be used in
documentation (e.g. Create TypeScript App)`,
docsSection: "core",
type: "string",
},
} as const;