Skip to content

Commit 5fb3d87

Browse files
committed
docs: options docs
1 parent 0b52c07 commit 5fb3d87

File tree

2 files changed

+38
-16
lines changed

2 files changed

+38
-16
lines changed

packages/cli/README.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -207,20 +207,38 @@ Each example is fully tested to demonstrate best practices for plugin testing as
207207

208208
### Common Command Options
209209

210-
| Option | Type | Default | Description |
211-
| --------------------------- | -------------------- | -------- | --------------------------------------------------------------------------- |
212-
| **`--persist.outputDir`** | `string` | n/a | Directory for the produced reports. |
213-
| **`--persist.filename`** | `string` | `report` | Filename for the produced reports without extension. |
214-
| **`--persist.format`** | `('json' \| 'md')[]` | `json` | Format(s) of the report file. |
215-
| **`--persist.skipReports`** | `boolean` | `false` | Skip generating report files. (useful in combination with caching) |
216-
| **`--upload.organization`** | `string` | n/a | Organization slug from portal. |
217-
| **`--upload.project`** | `string` | n/a | Project slug from portal. |
218-
| **`--upload.server`** | `string` | n/a | URL to your portal server. |
219-
| **`--upload.apiKey`** | `string` | n/a | API key for the portal server. |
220-
| **`--cache.read`** | `boolean` | `false` | If plugin audit outputs should be read from file system cache. |
221-
| **`--cache.write`** | `boolean` | `false` | If plugin audit outputs should be written to file system cache. |
222-
| **`--onlyPlugins`** | `string[]` | `[]` | Only run the specified plugins. Applicable to all commands except `upload`. |
223-
| **`--skipPlugins`** | `string[]` | `[]` | Skip the specified plugins. Applicable to all commands except `upload`. |
210+
#### Global Options
211+
212+
| Option | Type | Default | Description |
213+
| ------------------- | ---------- | ------- | --------------------------------------------------------------------------- |
214+
| **`--onlyPlugins`** | `string[]` | `[]` | Only run the specified plugins. Applicable to all commands except `upload`. |
215+
| **`--skipPlugins`** | `string[]` | `[]` | Skip the specified plugins. Applicable to all commands except `upload`. |
216+
217+
#### Cache Options
218+
219+
| Option | Type | Default | Description |
220+
| ------------------- | --------- | ------- | --------------------------------------------------------------- |
221+
| **`--cache`** | `boolean` | `false` | Cache runner outputs (both read and write). |
222+
| **`--cache.read`** | `boolean` | `false` | If plugin audit outputs should be read from file system cache. |
223+
| **`--cache.write`** | `boolean` | `false` | If plugin audit outputs should be written to file system cache. |
224+
225+
#### Persist Options
226+
227+
| Option | Type | Default | Description |
228+
| --------------------------- | -------------------- | -------- | ------------------------------------------------------------------ |
229+
| **`--persist.outputDir`** | `string` | n/a | Directory for the produced reports. |
230+
| **`--persist.filename`** | `string` | `report` | Filename for the produced reports without extension. |
231+
| **`--persist.format`** | `('json' \| 'md')[]` | `json` | Format(s) of the report file. |
232+
| **`--persist.skipReports`** | `boolean` | `false` | Skip generating report files. (useful in combination with caching) |
233+
234+
#### Upload Options
235+
236+
| Option | Type | Default | Description |
237+
| --------------------------- | -------- | ------- | ------------------------------ |
238+
| **`--upload.organization`** | `string` | n/a | Organization slug from portal. |
239+
| **`--upload.project`** | `string` | n/a | Project slug from portal. |
240+
| **`--upload.server`** | `string` | n/a | URL to your portal server. |
241+
| **`--upload.apiKey`** | `string` | n/a | API key for the portal server. |
224242

225243
> [!NOTE]
226244
> All common options, except `--onlyPlugins` and `--skipPlugins`, can be specified in the configuration file as well.

packages/cli/docs/nx-caching.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,12 @@ export default {
7777
"options": {
7878
"command": "npx @code-pushup/cli",
7979
"config": "{projectRoot}/code-pushup.config.ts",
80-
"cache.read": true,
81-
"upload.project": "{projectName}",
80+
"cache": {
81+
"read": true
82+
},
83+
"upload": {
84+
"project": "{projectName}"
85+
},
8286
"outputPath": "{projectRoot}/.code-pushup"
8387
},
8488
"dependsOn": ["code-pushup:coverage"]

0 commit comments

Comments
 (0)