microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
92f7dc8654f967aa9e489c2e8da384f922f00a4b

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

common/config/rush/command-line.json

212lines · modecode

1/**
2 * This configuration file defines custom commands for the "rush" command-line.
3 * For full documentation, please see 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 "commandKind": "global",
15 "safeForSimultaneousRushProcesses": true,
16 "name": "watch",
17 "summary": "(CUSTOM) Runs TypeScript compiler in watch mode on all projects.",
18 "shellCommand": "node eng/scripts/watch.js"
19 },
20 {
21 "commandKind": "bulk",
22 "name": "test",
23 "summary": "(CUSTOM) Runs all tests.",
24 "enableParallelism": true,
25 "ignoreMissingScript": true,
26 "ignoreDependencyOrder": true
27 },
28 {
29 "commandKind": "bulk",
30 "name": "test-official",
31 "summary": "(CUSTOM) Runs all tests for CI or PR validation. Disallows .only.",
32 "enableParallelism": true,
33 "ignoreMissingScript": true,
34 "ignoreDependencyOrder": true
35 },
36 {
37 "commandKind": "global",
38 "safeForSimultaneousRushProcesses": true,
39 "name": "merge-coverage",
40 "summary": "(CUSTOM) Merge the coverage reports generated by running `rush test-official`",
41 "shellCommand": "npx istanbul report --include **/coverage/**/coverage-final.json cobertura text"
42 },
43 {
44 "commandKind": "global",
45 "name": "format",
46 "summary": "(CUSTOM) Formats all code with Prettier.",
47 "shellCommand": "node eng/scripts/format.js"
48 },
49 {
50 "commandKind": "global",
51 "name": "check-format",
52 "summary": "(CUSTOM) Checks formatting of all code with with Prettier.",
53 "shellCommand": "node eng/scripts/check-format.js"
54 },
55 {
56 "commandKind": "global",
57 "name": "regen-docs",
58 "summary": "(CUSTOM) Regenerate the reference docs.",
59 "shellCommand": "node eng/scripts/npm-run.js regen-docs"
60 },
61 {
62 "commandKind": "global",
63 "name": "regen-samples",
64 "summary": "(CUSTOM) Regenerate samples.",
65 "shellCommand": "node eng/scripts/npm-run.js regen-samples"
66 },
67 {
68 "commandKind": "global",
69 "name": "update-latest-docs",
70 "summary": "(CUSTOM) Copy the current docs to the latest.",
71 "shellCommand": "node eng/scripts/npm-run.js update-latest-docs"
72 },
73 {
74 "commandKind": "global",
75 "name": "cspell",
76 "summary": "(CUSTOM) Check spelling.",
77 "shellCommand": "node eng/scripts/cspell.js"
78 },
79 {
80 "commandKind": "global",
81 "safeForSimultaneousRushProcesses": true,
82 "name": "dogfood",
83 "summary": "(CUSTOM) Globally installs local builds of @typespec/compiler and typespec-vscode.",
84 "shellCommand": "node eng/scripts/dogfood.js"
85 },
86 {
87 "commandKind": "bulk",
88 "name": "lint",
89 "summary": "Lint projects. Runs `npm run lint` on all projects.",
90 "enableParallelism": true,
91 "ignoreMissingScript": true,
92 "ignoreDependencyOrder": true
93 },
94 {
95 "commandKind": "bulk",
96 "name": "lint:fix",
97 "summary": "Fix lint issues in projects. Runs `npm run lint:fix` on all projects.",
98 "enableParallelism": true,
99 "ignoreMissingScript": true,
100 "ignoreDependencyOrder": true
101 },
102 {
103 "commandKind": "global",
104 "safeForSimultaneousRushProcesses": true,
105 "name": "e2e",
106 "summary": "(CUSTOM) Runs the e2e tests",
107 "shellCommand": "node e2e/e2e-tests.js"
108 },
109 {
110 "commandKind": "bulk",
111 "name": "clean",
112 "summary": "(CUSTOM) Run `npm run clean` on all the projects.",
113 "enableParallelism": true,
114 "ignoreMissingScript": true,
115 "ignoreDependencyOrder": true
116 }
117 ],
118 /**
119 * Custom "parameters" introduce new parameters for specified Rush command-line commands.
120 * For example, you might define a "--production" parameter for the "rush build" command.
121 */
122 "parameters": [
123 // {
124 // /**
125 // * (Required) Determines the type of custom parameter.
126 // * A "flag" is a custom command-line parameter whose presence acts as an on/off switch.
127 // */
128 // "parameterKind": "flag",
129 //
130 // /**
131 // * (Required) The long name of the parameter. It must be lower-case and use dash delimiters.
132 // */
133 // "longName": "--my-flag",
134 //
135 // /**
136 // * An optional alternative short name for the parameter. It must be a dash followed by a single
137 // * lower-case or upper-case letter, which is case-sensitive.
138 // *
139 // * NOTE: The Rush developers recommend that automation scripts should always use the long name
140 // * to improve readability. The short name is only intended as a convenience for humans.
141 // * The alphabet letters run out quickly, and are difficult to memorize, so *only* use
142 // * a short name if you expect the parameter to be needed very often in everyday operations.
143 // */
144 // "shortName": "-m",
145 //
146 // /**
147 // * (Required) A long description to be shown in the command-line help.
148 // *
149 // * Whenever you introduce commands/parameters, taking a little time to write meaningful
150 // * documentation can make a big difference for the developer experience in your repo.
151 // */
152 // "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects",
153 //
154 // /**
155 // * (Required) A list of custom commands and/or built-in Rush commands that this parameter may
156 // * be used with. The parameter will be appended to the shell command that Rush invokes.
157 // */
158 // "associatedCommands": [ "build", "rebuild" ]
159 // },
160 //
161 // {
162 // /**
163 // * (Required) Determines the type of custom parameter.
164 // * A "flag" is a custom command-line parameter whose presence acts as an on/off switch.
165 // */
166 // "parameterKind": "choice",
167 // "longName": "--my-choice",
168 // "description": "A custom choice parameter for the \"my-global-command\" custom command",
169 //
170 // "associatedCommands": [ "my-global-command" ],
171 //
172 // /**
173 // * Normally if a parameter is omitted from the command line, it will not be passed
174 // * to the shell command. this value will be inserted by default. Whereas if a "defaultValue"
175 // * is defined, the parameter will always be passed to the shell command, and will use the
176 // * default value if unspecified. The value must be one of the defined alternatives.
177 // */
178 // "defaultValue": "vanilla",
179 //
180 // /**
181 // * (Required) A list of alternative argument values that can be chosen for this parameter.
182 // */
183 // "alternatives": [
184 // {
185 // /**
186 // * A token that is one of the alternatives that can be used with the choice parameter,
187 // * e.g. "vanilla" in "--flavor vanilla".
188 // */
189 // "name": "vanilla",
190 //
191 // /**
192 // * A detailed description for the alternative that can be shown in the command-line help.
193 // *
194 // * Whenever you introduce commands/parameters, taking a little time to write meaningful
195 // * documentation can make a big difference for the developer experience in your repo.
196 // */
197 // "description": "Use the vanilla flavor (the default)"
198 // },
199 //
200 // {
201 // "name": "chocolate",
202 // "description": "Use the chocolate flavor"
203 // },
204 //
205 // {
206 // "name": "strawberry",
207 // "description": "Use the strawberry flavor"
208 // }
209 // ]
210 // }
211 ]
212}
213