Skip to content

Commit 9b4e82e

Browse files
tido64thymikee
andauthored
docs: added docs for clean (#1589)
* docs: added docs for `clean` * Update docs/commands.md Co-authored-by: Michał Pierzchała <[email protected]> * Update docs/commands.md * list all valid values Co-authored-by: Michał Pierzchała <[email protected]>
1 parent ada9516 commit 9b4e82e

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

docs/commands.md

+30-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
React Native CLI comes with following commands:
44

55
- [`bundle`](#bundle)
6+
- [`clean`](#clean)
67
- [`config`](#config)
78
- [`doctor`](#doctor)
89
- [`init`](#init)
@@ -124,6 +125,34 @@ Try to fetch transformed JS code from the global cache, if configured.
124125

125126
Path to the CLI configuration file.
126127

128+
### `clean`
129+
130+
Usage:
131+
132+
```sh
133+
react-native clean
134+
```
135+
136+
Cleans caches. Commonly used to ensure build failures are not due to stale cache. By default, it will prompt which caches to purge, with Watchman and Metro already checked. To omit interactive prompt (e.g. in scripts), please use `--include` flag.
137+
138+
#### Options
139+
140+
#### `--include <string>`
141+
142+
Comma-separated flag of caches to clear e.g. `npm,yarn`. If omitted, an interactive prompt will appear. Valid values include `android`, `cocoapods`, `metro`, `npm`, `watchman`, and `yarn`.
143+
144+
#### `--project-root <string>`
145+
146+
> default: current working directory
147+
148+
Root path to your React Native project. When not specified, defaults to current working directory.
149+
150+
#### `--verify-cache`
151+
152+
> default: false
153+
154+
Whether to verify the cache. Currently only applies to npm cache.
155+
127156
### `config`
128157

129158
Usage:
@@ -349,7 +378,7 @@ Example: `yarn react-native run-android --tasks clean,installDebug`.
349378
> default: false
350379
351380
Do not run [jetifier](https://www.npmjs.com/package/jetifier) – the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet.
352-
381+
353382
#### `--active-arch-only`
354383

355384
> default: false

0 commit comments

Comments
 (0)