command-line.json 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. /**
  2. * This configuration file defines custom commands for the "rush" command-line.
  3. * More documentation is available on the Rush website: https://rushjs.io
  4. */
  5. {
  6. "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
  7. /**
  8. * Custom "commands" introduce new verbs for the command-line. To see the help for these
  9. * example commands, try "rush --help", "rush my-bulk-command --help", or
  10. * "rush my-global-command --help".
  11. */
  12. "commands": [
  13. // {
  14. // /**
  15. // * (Required) Determines the type of custom command.
  16. // * Rush's "bulk" commands are invoked separately for each project. By default, the command will run for
  17. // * every project in the repo, according to the dependency graph (similar to how "rush build" works).
  18. // * The set of projects can be restricted e.g. using the "--to" or "--from" parameters.
  19. // */
  20. // "commandKind": "bulk",
  21. //
  22. // /**
  23. // * (Required) The name that will be typed as part of the command line. This is also the name
  24. // * of the "scripts" hook in the project's package.json file (if "shellCommand" is not specified).
  25. // *
  26. // * The name should be comprised of lower case words separated by hyphens or colons. The name should include an
  27. // * English verb (e.g. "deploy"). Use a hyphen to separate words (e.g. "upload-docs"). A group of related commands
  28. // * can be prefixed with a colon (e.g. "docs:generate", "docs:deploy", "docs:serve", etc).
  29. // *
  30. // * Note that if the "rebuild" command is overridden here, it becomes separated from the "build" command
  31. // * and will call the "rebuild" script instead of the "build" script.
  32. // */
  33. // "name": "my-bulk-command",
  34. //
  35. // /**
  36. // * (Required) A short summary of the custom command to be shown when printing command line
  37. // * help, e.g. "rush --help".
  38. // */
  39. // "summary": "Example bulk custom command",
  40. //
  41. // /**
  42. // * A detailed description of the command to be shown when printing command line
  43. // * help (e.g. "rush --help my-command").
  44. // * If omitted, the "summary" text will be shown instead.
  45. // *
  46. // * Whenever you introduce commands/parameters, taking a little time to write meaningful
  47. // * documentation can make a big difference for the developer experience in your repo.
  48. // */
  49. // "description": "This is an example custom command that runs separately for each project",
  50. //
  51. // /**
  52. // * By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously
  53. // * in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the
  54. // * same time.) If your command makes sense to run concurrently with other operations,
  55. // * set "safeForSimultaneousRushProcesses" to true to disable this protection.
  56. // *
  57. // * In particular, this is needed for custom scripts that invoke other Rush commands.
  58. // */
  59. // "safeForSimultaneousRushProcesses": false,
  60. //
  61. // /**
  62. // * (Optional) If the `shellCommand` field is set for a bulk command, Rush will invoke it for each
  63. // * selected project; otherwise, Rush will invoke the package.json `"scripts"` entry matching Rush command name.
  64. // *
  65. // * The string is the path to a script that will be invoked using the OS shell. The working directory will be
  66. // * the folder that contains rush.json. If custom parameters are associated with this command, their
  67. // * values will be appended to the end of this string.
  68. // */
  69. // // "shellCommand": "node common/scripts/my-bulk-command.js",
  70. //
  71. // /**
  72. // * (Required) If true, then this command is safe to be run in parallel, i.e. executed
  73. // * simultaneously for multiple projects. Similar to "rush build", regardless of parallelism
  74. // * projects will not start processing until their dependencies have completed processing.
  75. // */
  76. // "enableParallelism": false,
  77. //
  78. // /**
  79. // * Normally projects will be processed according to their dependency order: a given project will not start
  80. // * processing the command until all of its dependencies have completed. This restriction doesn't apply for
  81. // * certain operations, for example a "clean" task that deletes output files. In this case
  82. // * you can set "ignoreDependencyOrder" to true to increase parallelism.
  83. // */
  84. // "ignoreDependencyOrder": false,
  85. //
  86. // /**
  87. // * Normally Rush requires that each project's package.json has a "scripts" entry matching
  88. // * the custom command name. To disable this check, set "ignoreMissingScript" to true;
  89. // * projects with a missing definition will be skipped.
  90. // */
  91. // "ignoreMissingScript": false,
  92. //
  93. // /**
  94. // * When invoking shell scripts, Rush uses a heuristic to distinguish errors from warnings:
  95. // * - If the shell script returns a nonzero process exit code, Rush interprets this as "one or more errors".
  96. // * Error output is displayed in red, and it prevents Rush from attempting to process any downstream projects.
  97. // * - If the shell script returns a zero process exit code but writes something to its stderr stream,
  98. // * Rush interprets this as "one or more warnings". Warning output is printed in yellow, but does NOT prevent
  99. // * Rush from processing downstream projects.
  100. // *
  101. // * Thus, warnings do not interfere with local development, but they will cause a CI job to fail, because
  102. // * the Rush process itself returns a nonzero exit code if there are any warnings or errors. This is by design.
  103. // * In an active monorepo, we've found that if you allow any warnings in your main branch, it inadvertently
  104. // * teaches developers to ignore warnings, which quickly leads to a situation where so many "expected" warnings
  105. // * have accumulated that warnings no longer serve any useful purpose.
  106. // *
  107. // * Sometimes a poorly behaved task will write output to stderr even though its operation was successful.
  108. // * In that case, it's strongly recommended to fix the task. However, as a workaround you can set
  109. // * allowWarningsInSuccessfulBuild=true, which causes Rush to return a nonzero exit code for errors only.
  110. // *
  111. // * Note: The default value is false. In Rush 5.7.x and earlier, the default value was true.
  112. // */
  113. // "allowWarningsInSuccessfulBuild": false,
  114. //
  115. // /**
  116. // * If true then this command will be incremental like the built-in "build" command
  117. // */
  118. // "incremental": false,
  119. //
  120. // /**
  121. // * (EXPERIMENTAL) Normally Rush terminates after the command finishes. If this option is set to "true" Rush
  122. // * will instead enter a loop where it watches the file system for changes to the selected projects. Whenever a
  123. // * change is detected, the command will be invoked again for the changed project and any selected projects that
  124. // * directly or indirectly depend on it.
  125. // *
  126. // * For details, refer to the website article "Using watch mode".
  127. // */
  128. // "watchForChanges": false,
  129. //
  130. // /**
  131. // * (EXPERIMENTAL) Disable cache for this action. This may be useful if this command affects state outside of
  132. // * projects' own folders.
  133. // */
  134. // "disableBuildCache": false
  135. // },
  136. //
  137. // {
  138. // /**
  139. // * (Required) Determines the type of custom command.
  140. // * Rush's "global" commands are invoked once for the entire repo.
  141. // */
  142. // "commandKind": "global",
  143. //
  144. // "name": "my-global-command",
  145. // "summary": "Example global custom command",
  146. // "description": "This is an example custom command that runs once for the entire repo",
  147. //
  148. // "safeForSimultaneousRushProcesses": false,
  149. //
  150. // /**
  151. // * (Required) A script that will be invoked using the OS shell. The working directory will be
  152. // * the folder that contains rush.json. If custom parameters are associated with this command, their
  153. // * values will be appended to the end of this string.
  154. // */
  155. // "shellCommand": "node common/scripts/my-global-command.js",
  156. //
  157. // /**
  158. // * If your "shellCommand" script depends on NPM packages, the recommended best practice is
  159. // * to make it into a regular Rush project that builds using your normal toolchain. In cases where
  160. // * the command needs to work without first having to run "rush build", the recommended practice
  161. // * is to publish the project to an NPM registry and use common/scripts/install-run.js to launch it.
  162. // *
  163. // * Autoinstallers offer another possibility: They are folders under "common/autoinstallers" with
  164. // * a package.json file and shrinkwrap file. Rush will automatically invoke the package manager to
  165. // * install these dependencies before an associated command is invoked. Autoinstallers have the
  166. // * advantage that they work even in a branch where "rush install" is broken, which makes them a
  167. // * good solution for Git hook scripts. But they have the disadvantages of not being buildable
  168. // * projects, and of increasing the overall installation footprint for your monorepo.
  169. // *
  170. // * The "autoinstallerName" setting must not contain a path and must be a valid NPM package name.
  171. // * For example, the name "my-task" would map to "common/autoinstallers/my-task/package.json", and
  172. // * the "common/autoinstallers/my-task/node_modules/.bin" folder would be added to the shell PATH when
  173. // * invoking the "shellCommand".
  174. // */
  175. // // "autoinstallerName": "my-task"
  176. // }
  177. // 提交前的 lint 检查
  178. {
  179. "name": "lint-staged",
  180. "commandKind": "global",
  181. "summary": "⭐️️ Use to run some task before commit",
  182. "autoinstallerName": "rush-lint-staged",
  183. "shellCommand": "lint-staged --config common/autoinstallers/rush-lint-staged/.lintstagedrc.js"
  184. },
  185. {
  186. "name": "commitlint",
  187. "commandKind": "global",
  188. "summary": "⭐️️ Used by the pre-commit Git hook. This command invokes commitlint to ensure that the commit messages meet the conventional commit format",
  189. "safeForSimultaneousRushProcesses": true,
  190. "autoinstallerName": "rush-commitlint",
  191. "shellCommand": "commitlint"
  192. },
  193. // 循环依赖检查
  194. {
  195. "name": "check-circular-dependency",
  196. "commandKind": "global",
  197. "summary": "⭐️️ Auto check circular dependency",
  198. "safeForSimultaneousRushProcesses": true,
  199. "autoinstallerName": "rush-commands",
  200. "shellCommand": "node common/autoinstallers/rush-commands/check-circular-dependency.mjs"
  201. },
  202. /**
  203. * 检查依赖关系
  204. * check dependencies
  205. */
  206. {
  207. "name": "dep-check",
  208. "commandKind": "global",
  209. "summary": "⭐️️ Auto check dependency",
  210. "safeForSimultaneousRushProcesses": true,
  211. "autoinstallerName": "dep-check",
  212. "shellCommand": "node common/autoinstallers/dep-check/index.js"
  213. },
  214. {
  215. "commandKind": "bulk",
  216. "name": "test",
  217. "description": "Executes automated tests.",
  218. "allowWarningsInSuccessfulBuild": true,
  219. "ignoreMissingScript": true,
  220. "enableParallelism": true,
  221. "incremental": true,
  222. "summary": "⭐️️ Run test command for each package"
  223. },
  224. {
  225. "commandKind": "bulk",
  226. "name": "test:cov",
  227. "description": "Executes automated tests with coverage collection.",
  228. "allowWarningsInSuccessfulBuild": true,
  229. "ignoreMissingScript": true,
  230. "enableParallelism": true,
  231. "incremental": true,
  232. "summary": "⭐️️ Run coverage command for each package"
  233. },
  234. // 本地包构建 + watch
  235. {
  236. "name": "build:watch",
  237. "commandKind": "bulk",
  238. "summary": "⭐️️ Run build:watch command for each package",
  239. "description": "For details, see the article \"Using watch mode\" on the Rush website: https://rushjs.io/",
  240. "ignoreMissingScript": true,
  241. "safeForSimultaneousRushProcesses": true,
  242. // 使用增量构建逻辑 (重要)
  243. "incremental": true,
  244. "enableParallelism": true,
  245. // 启用 "watch mode"
  246. "watchForChanges": true
  247. },
  248. // 一键 build 所有包 + 运行 docs 官网 dev
  249. {
  250. "name": "dev:docs",
  251. "commandKind": "global",
  252. "summary": "⭐️️ Run dev in apps/docs",
  253. "autoinstallerName": "rush-commands",
  254. "safeForSimultaneousRushProcesses": true,
  255. "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/docs\" \"cd apps/docs && rushx dev\""
  256. },
  257. {
  258. "name": "ts-check",
  259. "commandKind": "bulk",
  260. "summary": "⭐️️ Run ts check in packages",
  261. "ignoreMissingScript": true,
  262. "enableParallelism": true,
  263. "safeForSimultaneousRushProcesses": true
  264. },
  265. {
  266. "name": "lint",
  267. "commandKind": "bulk",
  268. "summary": "⭐️️ Run eslint check in packages",
  269. "ignoreMissingScript": true,
  270. "enableParallelism": true,
  271. "safeForSimultaneousRushProcesses": true
  272. },
  273. {
  274. "name": "lint:fix",
  275. "commandKind": "bulk",
  276. "summary": "⭐️️ Run eslint fix in packages",
  277. "ignoreMissingScript": true,
  278. "enableParallelism": true,
  279. "safeForSimultaneousRushProcesses": true
  280. },
  281. {
  282. "name": "e2e:test",
  283. "commandKind": "bulk",
  284. "summary": "⭐️️ Run e2e cases in packages",
  285. "ignoreMissingScript": true,
  286. "enableParallelism": false,
  287. "allowWarningsInSuccessfulBuild": true,
  288. "safeForSimultaneousRushProcesses": false
  289. },
  290. {
  291. "name": "e2e:update-screenshot",
  292. "commandKind": "bulk",
  293. "summary": "⭐️️ Update screenshots of e2e cases",
  294. "ignoreMissingScript": true,
  295. "enableParallelism": false,
  296. "allowWarningsInSuccessfulBuild": true,
  297. "safeForSimultaneousRushProcesses": false
  298. },
  299. {
  300. "name": "dev:demo-fixed-layout",
  301. "commandKind": "global",
  302. "summary": "⭐️️ run dev in app/demo-fixed-layout",
  303. "autoinstallerName": "rush-commands",
  304. "safeForSimultaneousRushProcesses": true,
  305. "shellCommand": "concurrently --kill-others --raw --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-fixed-layout\" \"cd apps/demo-fixed-layout && rushx ts-check && rushx dev\""
  306. },
  307. {
  308. "name": "dev:demo-fixed-layout-animation",
  309. "commandKind": "global",
  310. "summary": "⭐️️ run dev in app/demo-fixed-layout-animation",
  311. "autoinstallerName": "rush-commands",
  312. "safeForSimultaneousRushProcesses": true,
  313. "shellCommand": "concurrently --kill-others --raw --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-fixed-layout-animation\" \"cd apps/demo-fixed-layout-animation && rushx ts-check && rushx dev\""
  314. },
  315. {
  316. "name": "dev:demo-fixed-layout-simple",
  317. "commandKind": "global",
  318. "summary": "⭐️️ run dev in app/demo-fixed-layout-simple",
  319. "autoinstallerName": "rush-commands",
  320. "safeForSimultaneousRushProcesses": true,
  321. "shellCommand": "concurrently --kill-others --raw --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-fixed-layout-simple\" \"cd apps/demo-fixed-layout-simple && rushx ts-check && rushx dev\""
  322. },
  323. {
  324. "name": "dev:demo-free-layout",
  325. "commandKind": "global",
  326. "summary": "⭐️️ run dev in app/demo-free-layout",
  327. "autoinstallerName": "rush-commands",
  328. "safeForSimultaneousRushProcesses": true,
  329. "shellCommand": "concurrently --kill-others --raw --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-free-layout\" \"cd apps/demo-free-layout && rushx ts-check && rushx dev\""
  330. },
  331. {
  332. "name": "dev:demo-free-layout-simple",
  333. "commandKind": "global",
  334. "summary": "⭐️️ run dev in app/demo-free-layout-simple",
  335. "autoinstallerName": "rush-commands",
  336. "safeForSimultaneousRushProcesses": true,
  337. "shellCommand": "concurrently --kill-others --raw --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-free-layout-simple\" \"cd apps/demo-free-layout-simple && rushx ts-check && rushx dev\""
  338. },
  339. {
  340. "name": "dev:demo-nextjs",
  341. "commandKind": "global",
  342. "summary": "⭐️️ run dev in app/demo-nextjs",
  343. "autoinstallerName": "rush-commands",
  344. "safeForSimultaneousRushProcesses": true,
  345. "shellCommand": "concurrently --kill-others --raw --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-nextjs\" \"cd apps/demo-nextjs && rushx ts-check && rushx dev\""
  346. },
  347. {
  348. "name": "dev:demo-nextjs-antd",
  349. "commandKind": "global",
  350. "summary": "⭐️️ run dev in app/demo-nextjs-antd",
  351. "autoinstallerName": "rush-commands",
  352. "safeForSimultaneousRushProcesses": true,
  353. "shellCommand": "concurrently --kill-others --raw --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-nextjs-antd\" \"cd apps/demo-nextjs-antd && rushx ts-check && rushx dev\""
  354. },
  355. {
  356. "name": "license-header",
  357. "commandKind": "global",
  358. "summary": "⭐️️ Update license header of all code files.",
  359. "safeForSimultaneousRushProcesses": true,
  360. "autoinstallerName": "license-header",
  361. "shellCommand": "node common/autoinstallers/license-header/index.js"
  362. }
  363. ],
  364. /**
  365. * Custom "parameters" introduce new parameters for specified Rush command-line commands.
  366. * For example, you might define a "--production" parameter for the "rush build" command.
  367. */
  368. "parameters": [
  369. // {
  370. // /**
  371. // * (Required) Determines the type of custom parameter.
  372. // * A "flag" is a custom command-line parameter whose presence acts as an on/off switch.
  373. // */
  374. // "parameterKind": "flag",
  375. //
  376. // /**
  377. // * (Required) The long name of the parameter. It must be lower-case and use dash delimiters.
  378. // */
  379. // "longName": "--my-flag",
  380. //
  381. // /**
  382. // * An optional alternative short name for the parameter. It must be a dash followed by a single
  383. // * lower-case or upper-case letter, which is case-sensitive.
  384. // *
  385. // * NOTE: The Rush developers recommend that automation scripts should always use the long name
  386. // * to improve readability. The short name is only intended as a convenience for humans.
  387. // * The alphabet letters run out quickly, and are difficult to memorize, so *only* use
  388. // * a short name if you expect the parameter to be needed very often in everyday operations.
  389. // */
  390. // "shortName": "-m",
  391. //
  392. // /**
  393. // * (Required) A long description to be shown in the command-line help.
  394. // *
  395. // * Whenever you introduce commands/parameters, taking a little time to write meaningful
  396. // * documentation can make a big difference for the developer experience in your repo.
  397. // */
  398. // "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects",
  399. //
  400. // /**
  401. // * (Required) A list of custom commands and/or built-in Rush commands that this parameter may
  402. // * be used with. The parameter will be appended to the shell command that Rush invokes.
  403. // */
  404. // "associatedCommands": ["build", "rebuild"]
  405. // },
  406. //
  407. // {
  408. // /**
  409. // * (Required) Determines the type of custom parameter.
  410. // * A "string" is a custom command-line parameter whose argument is a single text string.
  411. // */
  412. // "parameterKind": "string",
  413. // "longName": "--my-string",
  414. // "description": "A custom string parameter for the \"my-global-command\" custom command",
  415. //
  416. // "associatedCommands": ["my-global-command"],
  417. //
  418. // "argumentName": "SOME_TEXT",
  419. //
  420. // /**
  421. // * If true, this parameter must be included with the command. The default is false.
  422. // */
  423. // "required": false
  424. // },
  425. //
  426. // {
  427. // /**
  428. // * (Required) Determines the type of custom parameter.
  429. // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of
  430. // * allowable alternatives (similar to an enum).
  431. // */
  432. // "parameterKind": "choice",
  433. // "longName": "--my-choice",
  434. // "description": "A custom choice parameter for the \"my-global-command\" custom command",
  435. //
  436. // "associatedCommands": ["my-global-command"],
  437. // "required": false,
  438. //
  439. // /**
  440. // * If a "defaultValue" is specified, then if the Rush command line is invoked without
  441. // * this parameter, it will be automatically added with the "defaultValue" as the argument.
  442. // * The value must be one of the defined alternatives.
  443. // */
  444. // "defaultValue": "vanilla",
  445. //
  446. // /**
  447. // * (Required) A list of alternative argument values that can be chosen for this parameter.
  448. // */
  449. // "alternatives": [
  450. // {
  451. // /**
  452. // * A token that is one of the alternatives that can be used with the choice parameter,
  453. // * e.g. "vanilla" in "--flavor vanilla".
  454. // */
  455. // "name": "vanilla",
  456. //
  457. // /**
  458. // * A detailed description for the alternative that can be shown in the command-line help.
  459. // *
  460. // * Whenever you introduce commands/parameters, taking a little time to write meaningful
  461. // * documentation can make a big difference for the developer experience in your repo.
  462. // */
  463. // "description": "Use the vanilla flavor"
  464. // },
  465. //
  466. // {
  467. // "name": "chocolate",
  468. // "description": "Use the chocolate flavor"
  469. // },
  470. //
  471. // {
  472. // "name": "strawberry",
  473. // "description": "Use the strawberry flavor"
  474. // }
  475. // ]
  476. // },
  477. //
  478. // {
  479. // /**
  480. // * (Required) Determines the type of custom parameter.
  481. // * An "integer" is a custom command-line parameter whose value is an integer number.
  482. // */
  483. // "parameterKind": "integer",
  484. // "longName": "--my-integer",
  485. // "description": "A custom integer parameter for the \"my-global-command\" custom command",
  486. //
  487. // "associatedCommands": ["my-global-command"],
  488. // "argumentName": "SOME_NUMBER",
  489. // "required": false
  490. // },
  491. //
  492. // {
  493. // /**
  494. // * (Required) Determines the type of custom parameter.
  495. // * An "integerList" is a custom command-line parameter whose argument is an integer.
  496. // * The parameter can be specified multiple times to build a list.
  497. // *
  498. // * For example, if the parameter name is "--my-integer-list", then the custom command
  499. // * might be invoked as
  500. // * `rush my-global-command --my-integer-list 1 --my-integer-list 2 --my-integer-list 3`
  501. // * and the parsed array would be [1,2,3].
  502. // */
  503. // "parameterKind": "integerList",
  504. // "longName": "--my-integer-list",
  505. // "description": "A custom integer list parameter for the \"my-global-command\" custom command",
  506. //
  507. // "associatedCommands": ["my-global-command"],
  508. // "argumentName": "SOME_NUMBER",
  509. // "required": false
  510. // },
  511. //
  512. // {
  513. // /**
  514. // * (Required) Determines the type of custom parameter.
  515. // * An "stringList" is a custom command-line parameter whose argument is a text string.
  516. // * The parameter can be specified multiple times to build a list.
  517. // *
  518. // * For example, if the parameter name is "--my-string-list", then the custom command
  519. // * might be invoked as
  520. // * `rush my-global-command --my-string-list A --my-string-list B --my-string-list C`
  521. // * and the parsed array would be [A,B,C].
  522. // */
  523. // "parameterKind": "stringList",
  524. // "longName": "--my-string-list",
  525. // "description": "A custom string list parameter for the \"my-global-command\" custom command",
  526. //
  527. // "associatedCommands": ["my-global-command"],
  528. // "argumentName": "SOME_TEXT",
  529. // "required": false
  530. // },
  531. //
  532. // {
  533. // /**
  534. // * (Required) Determines the type of custom parameter.
  535. // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of
  536. // * allowable alternatives (similar to an enum).
  537. // * The parameter can be specified multiple times to build a list.
  538. // *
  539. // * For example, if the parameter name is "--my-choice-list", then the custom command
  540. // * might be invoked as
  541. // * `rush my-global-command --my-string-list vanilla --my-string-list chocolate`
  542. // * and the parsed array would be [vanilla,chocolate].
  543. // */
  544. // "parameterKind": "choiceList",
  545. // "longName": "--my-choice-list",
  546. // "description": "A custom choice list parameter for the \"my-global-command\" custom command",
  547. //
  548. // "associatedCommands": ["my-global-command"],
  549. // "required": false,
  550. //
  551. // /**
  552. // * (Required) A list of alternative argument values that can be chosen for this parameter.
  553. // */
  554. // "alternatives": [
  555. // {
  556. // /**
  557. // * A token that is one of the alternatives that can be used with the choice parameter,
  558. // * e.g. "vanilla" in "--flavor vanilla".
  559. // */
  560. // "name": "vanilla",
  561. //
  562. // /**
  563. // * A detailed description for the alternative that can be shown in the command-line help.
  564. // *
  565. // * Whenever you introduce commands/parameters, taking a little time to write meaningful
  566. // * documentation can make a big difference for the developer experience in your repo.
  567. // */
  568. // "description": "Use the vanilla flavor"
  569. // },
  570. //
  571. // {
  572. // "name": "chocolate",
  573. // "description": "Use the chocolate flavor"
  574. // },
  575. //
  576. // {
  577. // "name": "strawberry",
  578. // "description": "Use the strawberry flavor"
  579. // }
  580. // ]
  581. // }
  582. {
  583. "parameterKind": "string",
  584. "argumentName": "MESSAGE",
  585. "longName": "--edit",
  586. "description": "",
  587. "associatedCommands": [
  588. "commitlint"
  589. ]
  590. },
  591. {
  592. "parameterKind": "string",
  593. "argumentName": "MESSAGE",
  594. "longName": "--config",
  595. "description": "",
  596. "associatedCommands": [
  597. "commitlint"
  598. ]
  599. }
  600. ]
  601. }