command-line.json 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  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. "allowWarningsInSuccessfulBuild": true,
  272. "safeForSimultaneousRushProcesses": true
  273. },
  274. {
  275. "name": "lint:fix",
  276. "commandKind": "bulk",
  277. "summary": "⭐️️ Run eslint fix in packages",
  278. "ignoreMissingScript": true,
  279. "enableParallelism": true,
  280. "safeForSimultaneousRushProcesses": true
  281. },
  282. {
  283. "name": "e2e:test",
  284. "commandKind": "bulk",
  285. "summary": "⭐️️ Run e2e cases in packages",
  286. "ignoreMissingScript": true,
  287. "enableParallelism": false,
  288. "allowWarningsInSuccessfulBuild": true,
  289. "safeForSimultaneousRushProcesses": false
  290. },
  291. {
  292. "name": "e2e:update-screenshot",
  293. "commandKind": "bulk",
  294. "summary": "⭐️️ Update screenshots of e2e cases",
  295. "ignoreMissingScript": true,
  296. "enableParallelism": false,
  297. "allowWarningsInSuccessfulBuild": true,
  298. "safeForSimultaneousRushProcesses": false
  299. },
  300. {
  301. "name": "dev:demo-fixed-layout",
  302. "commandKind": "global",
  303. "summary": "⭐️️ run dev in app/demo-fixed-layout",
  304. "autoinstallerName": "rush-commands",
  305. "safeForSimultaneousRushProcesses": true,
  306. "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\""
  307. },
  308. {
  309. "name": "dev:demo-fixed-layout-animation",
  310. "commandKind": "global",
  311. "summary": "⭐️️ run dev in app/demo-fixed-layout-animation",
  312. "autoinstallerName": "rush-commands",
  313. "safeForSimultaneousRushProcesses": true,
  314. "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\""
  315. },
  316. {
  317. "name": "dev:demo-fixed-layout-simple",
  318. "commandKind": "global",
  319. "summary": "⭐️️ run dev in app/demo-fixed-layout-simple",
  320. "autoinstallerName": "rush-commands",
  321. "safeForSimultaneousRushProcesses": true,
  322. "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\""
  323. },
  324. {
  325. "name": "dev:demo-free-layout",
  326. "commandKind": "global",
  327. "summary": "⭐️️ run dev in app/demo-free-layout",
  328. "autoinstallerName": "rush-commands",
  329. "safeForSimultaneousRushProcesses": true,
  330. "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\""
  331. },
  332. {
  333. "name": "dev:demo-free-layout-simple",
  334. "commandKind": "global",
  335. "summary": "⭐️️ run dev in app/demo-free-layout-simple",
  336. "autoinstallerName": "rush-commands",
  337. "safeForSimultaneousRushProcesses": true,
  338. "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\""
  339. },
  340. {
  341. "name": "dev:demo-nextjs",
  342. "commandKind": "global",
  343. "summary": "⭐️️ run dev in app/demo-nextjs",
  344. "autoinstallerName": "rush-commands",
  345. "safeForSimultaneousRushProcesses": true,
  346. "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\""
  347. },
  348. {
  349. "name": "dev:demo-nextjs-antd",
  350. "commandKind": "global",
  351. "summary": "⭐️️ run dev in app/demo-nextjs-antd",
  352. "autoinstallerName": "rush-commands",
  353. "safeForSimultaneousRushProcesses": true,
  354. "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\""
  355. },
  356. {
  357. "name": "license-header",
  358. "commandKind": "global",
  359. "summary": "⭐️️ Update license header of all code files.",
  360. "safeForSimultaneousRushProcesses": true,
  361. "autoinstallerName": "license-header",
  362. "shellCommand": "node common/autoinstallers/license-header/index.js"
  363. }
  364. ],
  365. /**
  366. * Custom "parameters" introduce new parameters for specified Rush command-line commands.
  367. * For example, you might define a "--production" parameter for the "rush build" command.
  368. */
  369. "parameters": [
  370. // {
  371. // /**
  372. // * (Required) Determines the type of custom parameter.
  373. // * A "flag" is a custom command-line parameter whose presence acts as an on/off switch.
  374. // */
  375. // "parameterKind": "flag",
  376. //
  377. // /**
  378. // * (Required) The long name of the parameter. It must be lower-case and use dash delimiters.
  379. // */
  380. // "longName": "--my-flag",
  381. //
  382. // /**
  383. // * An optional alternative short name for the parameter. It must be a dash followed by a single
  384. // * lower-case or upper-case letter, which is case-sensitive.
  385. // *
  386. // * NOTE: The Rush developers recommend that automation scripts should always use the long name
  387. // * to improve readability. The short name is only intended as a convenience for humans.
  388. // * The alphabet letters run out quickly, and are difficult to memorize, so *only* use
  389. // * a short name if you expect the parameter to be needed very often in everyday operations.
  390. // */
  391. // "shortName": "-m",
  392. //
  393. // /**
  394. // * (Required) A long description to be shown in the command-line help.
  395. // *
  396. // * Whenever you introduce commands/parameters, taking a little time to write meaningful
  397. // * documentation can make a big difference for the developer experience in your repo.
  398. // */
  399. // "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects",
  400. //
  401. // /**
  402. // * (Required) A list of custom commands and/or built-in Rush commands that this parameter may
  403. // * be used with. The parameter will be appended to the shell command that Rush invokes.
  404. // */
  405. // "associatedCommands": ["build", "rebuild"]
  406. // },
  407. //
  408. // {
  409. // /**
  410. // * (Required) Determines the type of custom parameter.
  411. // * A "string" is a custom command-line parameter whose argument is a single text string.
  412. // */
  413. // "parameterKind": "string",
  414. // "longName": "--my-string",
  415. // "description": "A custom string parameter for the \"my-global-command\" custom command",
  416. //
  417. // "associatedCommands": ["my-global-command"],
  418. //
  419. // "argumentName": "SOME_TEXT",
  420. //
  421. // /**
  422. // * If true, this parameter must be included with the command. The default is false.
  423. // */
  424. // "required": false
  425. // },
  426. //
  427. // {
  428. // /**
  429. // * (Required) Determines the type of custom parameter.
  430. // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of
  431. // * allowable alternatives (similar to an enum).
  432. // */
  433. // "parameterKind": "choice",
  434. // "longName": "--my-choice",
  435. // "description": "A custom choice parameter for the \"my-global-command\" custom command",
  436. //
  437. // "associatedCommands": ["my-global-command"],
  438. // "required": false,
  439. //
  440. // /**
  441. // * If a "defaultValue" is specified, then if the Rush command line is invoked without
  442. // * this parameter, it will be automatically added with the "defaultValue" as the argument.
  443. // * The value must be one of the defined alternatives.
  444. // */
  445. // "defaultValue": "vanilla",
  446. //
  447. // /**
  448. // * (Required) A list of alternative argument values that can be chosen for this parameter.
  449. // */
  450. // "alternatives": [
  451. // {
  452. // /**
  453. // * A token that is one of the alternatives that can be used with the choice parameter,
  454. // * e.g. "vanilla" in "--flavor vanilla".
  455. // */
  456. // "name": "vanilla",
  457. //
  458. // /**
  459. // * A detailed description for the alternative that can be shown in the command-line help.
  460. // *
  461. // * Whenever you introduce commands/parameters, taking a little time to write meaningful
  462. // * documentation can make a big difference for the developer experience in your repo.
  463. // */
  464. // "description": "Use the vanilla flavor"
  465. // },
  466. //
  467. // {
  468. // "name": "chocolate",
  469. // "description": "Use the chocolate flavor"
  470. // },
  471. //
  472. // {
  473. // "name": "strawberry",
  474. // "description": "Use the strawberry flavor"
  475. // }
  476. // ]
  477. // },
  478. //
  479. // {
  480. // /**
  481. // * (Required) Determines the type of custom parameter.
  482. // * An "integer" is a custom command-line parameter whose value is an integer number.
  483. // */
  484. // "parameterKind": "integer",
  485. // "longName": "--my-integer",
  486. // "description": "A custom integer parameter for the \"my-global-command\" custom command",
  487. //
  488. // "associatedCommands": ["my-global-command"],
  489. // "argumentName": "SOME_NUMBER",
  490. // "required": false
  491. // },
  492. //
  493. // {
  494. // /**
  495. // * (Required) Determines the type of custom parameter.
  496. // * An "integerList" is a custom command-line parameter whose argument is an integer.
  497. // * The parameter can be specified multiple times to build a list.
  498. // *
  499. // * For example, if the parameter name is "--my-integer-list", then the custom command
  500. // * might be invoked as
  501. // * `rush my-global-command --my-integer-list 1 --my-integer-list 2 --my-integer-list 3`
  502. // * and the parsed array would be [1,2,3].
  503. // */
  504. // "parameterKind": "integerList",
  505. // "longName": "--my-integer-list",
  506. // "description": "A custom integer list parameter for the \"my-global-command\" custom command",
  507. //
  508. // "associatedCommands": ["my-global-command"],
  509. // "argumentName": "SOME_NUMBER",
  510. // "required": false
  511. // },
  512. //
  513. // {
  514. // /**
  515. // * (Required) Determines the type of custom parameter.
  516. // * An "stringList" is a custom command-line parameter whose argument is a text string.
  517. // * The parameter can be specified multiple times to build a list.
  518. // *
  519. // * For example, if the parameter name is "--my-string-list", then the custom command
  520. // * might be invoked as
  521. // * `rush my-global-command --my-string-list A --my-string-list B --my-string-list C`
  522. // * and the parsed array would be [A,B,C].
  523. // */
  524. // "parameterKind": "stringList",
  525. // "longName": "--my-string-list",
  526. // "description": "A custom string list parameter for the \"my-global-command\" custom command",
  527. //
  528. // "associatedCommands": ["my-global-command"],
  529. // "argumentName": "SOME_TEXT",
  530. // "required": false
  531. // },
  532. //
  533. // {
  534. // /**
  535. // * (Required) Determines the type of custom parameter.
  536. // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of
  537. // * allowable alternatives (similar to an enum).
  538. // * The parameter can be specified multiple times to build a list.
  539. // *
  540. // * For example, if the parameter name is "--my-choice-list", then the custom command
  541. // * might be invoked as
  542. // * `rush my-global-command --my-string-list vanilla --my-string-list chocolate`
  543. // * and the parsed array would be [vanilla,chocolate].
  544. // */
  545. // "parameterKind": "choiceList",
  546. // "longName": "--my-choice-list",
  547. // "description": "A custom choice list parameter for the \"my-global-command\" custom command",
  548. //
  549. // "associatedCommands": ["my-global-command"],
  550. // "required": false,
  551. //
  552. // /**
  553. // * (Required) A list of alternative argument values that can be chosen for this parameter.
  554. // */
  555. // "alternatives": [
  556. // {
  557. // /**
  558. // * A token that is one of the alternatives that can be used with the choice parameter,
  559. // * e.g. "vanilla" in "--flavor vanilla".
  560. // */
  561. // "name": "vanilla",
  562. //
  563. // /**
  564. // * A detailed description for the alternative that can be shown in the command-line help.
  565. // *
  566. // * Whenever you introduce commands/parameters, taking a little time to write meaningful
  567. // * documentation can make a big difference for the developer experience in your repo.
  568. // */
  569. // "description": "Use the vanilla flavor"
  570. // },
  571. //
  572. // {
  573. // "name": "chocolate",
  574. // "description": "Use the chocolate flavor"
  575. // },
  576. //
  577. // {
  578. // "name": "strawberry",
  579. // "description": "Use the strawberry flavor"
  580. // }
  581. // ]
  582. // }
  583. {
  584. "parameterKind": "string",
  585. "argumentName": "MESSAGE",
  586. "longName": "--edit",
  587. "description": "",
  588. "associatedCommands": [
  589. "commitlint"
  590. ]
  591. },
  592. {
  593. "parameterKind": "string",
  594. "argumentName": "MESSAGE",
  595. "longName": "--config",
  596. "description": "",
  597. "associatedCommands": [
  598. "commitlint"
  599. ]
  600. }
  601. ]
  602. }