forked from react-native-community/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add missing
README.md
for all packages. (react-native-communi…
…ty#1871) * docs: add `README.md` for `cli-platform-ios` * docs: add `README.md` for `cli-platform-android` * docs: add `README.md` for `cli-plugin-metro` * docs: add `README.md` for `cli-clean` * docs: add `README.md` for `cli-config` * docs: add `README.md` for `cli-doctor` * docs: add `README.md` for `cli-hermes`
- Loading branch information
1 parent
0d13ba9
commit 2d48c86
Showing
8 changed files
with
710 additions
and
624 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# @react-native-community/cli-clean | ||
|
||
This package is part of the [React Native CLI](../../README.md). It contains commands for cleaning the build artifacts. | ||
|
||
## Installation | ||
|
||
```sh | ||
yarn add @react-native-community/cli-clean | ||
``` | ||
|
||
## Commands | ||
|
||
### `clean` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native clean | ||
``` | ||
|
||
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. | ||
|
||
#### Options | ||
|
||
#### `--include <string>` | ||
|
||
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`. | ||
|
||
#### `--project-root <string>` | ||
|
||
> default: current working directory | ||
Root path to your React Native project. When not specified, defaults to current working directory. | ||
|
||
#### `--verify-cache` | ||
|
||
> default: false | ||
Whether to verify the cache. Currently only applies to npm cache. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# @react-native-community/cli-config | ||
|
||
This package is part of the [React Native CLI](../../README.md). It contains commands for managing the configuration of React Native app. | ||
|
||
## Installation | ||
|
||
```sh | ||
yarn add @react-native-community/cli-config | ||
``` | ||
|
||
## Commands | ||
|
||
### `config` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native config | ||
``` | ||
|
||
Output project and dependencies configuration in JSON format to stdout. Used by [autolinking](./../../docs/autolinking.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# @react-native-community/cli-doctor | ||
|
||
This package is part of the [React Native CLI](../../README.md). It contains commands for diagnosing and fixing common Node.js, iOS, Android & React Native issues. | ||
|
||
## Installation | ||
|
||
```sh | ||
yarn add @react-native-community/cli-doctor | ||
``` | ||
|
||
## Commands | ||
|
||
### `doctor` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native doctor | ||
``` | ||
|
||
Diagnose and fix common Node.js, iOS, Android & React Native issues. | ||
|
||
### `info` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native info | ||
``` | ||
|
||
Get relevant version info about OS, toolchain and libraries. Useful when sending bug reports. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# @react-native-community/cli-hermes | ||
|
||
This package is part of the [React Native CLI](../../README.md). It contains commands for managing the Hermes engine. | ||
|
||
## Installation | ||
|
||
```sh | ||
yarn add @react-native-community/cli-hermes | ||
``` | ||
|
||
## Commands | ||
|
||
### `profile-hermes` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native profile-hermes [destinationDir] <flag> | ||
``` | ||
|
||
Pull and convert a Hermes tracing profile to Chrome tracing profile, then store it in the directory <destinationDir> of the local machine. | ||
|
||
- `destinationDir` is optional, if provided, pull the file to that directory | ||
> default: pull to the current React Native app root directory | ||
#### Options | ||
|
||
#### `--filename <string>` | ||
|
||
File name of the profile to be downloaded, eg. sampling-profiler-trace8593107139682635366.cpuprofile. | ||
|
||
> default: pull the latest file | ||
#### `--raw` | ||
|
||
Pulls the original Hermes tracing profile without any transformation | ||
|
||
#### `--sourcemap-path <string>` | ||
|
||
The local path to your source map file if you generated it manually, ex. `/tmp/sourcemap.json` | ||
|
||
#### `--generate-sourcemap` | ||
|
||
Generate the JS bundle and source map in `os.tmpdir()` | ||
|
||
#### `--port <number>` | ||
|
||
The running metro server port number | ||
|
||
> default: 8081 | ||
#### `--appId <string>` | ||
|
||
Specify an `applicationId` to launch after build. If not specified, `package` from AndroidManifest.xml will be used. | ||
|
||
#### `--appIdSuffix <string>` | ||
|
||
Specify an `applicationIdSuffix` to launch after build. | ||
|
||
### Notes on source map | ||
|
||
This step is recommended in order for the source map to be generated: | ||
|
||
If you are planning on building a debug APK, that will run without the packager, by invoking `./gradlew assembleDebug` you can simply set `bundleInDebug: true` in your app/build.gradle file, inside the `project.ext.react` map. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# @react-native-community/cli-platform-android | ||
|
||
This package is part of the [React Native CLI](../../README.md). It contains commands for managing the Android part of React Native app. | ||
|
||
## Installation | ||
|
||
```sh | ||
yarn add @react-native-community/cli-platform-android | ||
``` | ||
|
||
## Commands | ||
|
||
### `run-android` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native run-android [options] | ||
``` | ||
|
||
Builds your app and starts it on a connected Android emulator or device. | ||
|
||
#### Options | ||
|
||
#### `--root <string>` | ||
|
||
> **DEPRECATED** – root is discovered automatically | ||
Override the root directory for the Android build (which contains the android directory)'. | ||
|
||
#### `--variant <string>` | ||
|
||
> **DEPRECATED** – use "mode" instead | ||
> default: 'debug' | ||
Specify your app's build variant. | ||
|
||
#### `--appFolder <string>` | ||
|
||
> **DEPRECATED** – use "project.android.appName" in react-native.config.js | ||
> default: 'app' | ||
Specify a different application folder name for the Android source. If not, we assume is "app". | ||
|
||
#### `--appId <string>` | ||
|
||
Specify an `applicationId` to launch after build. If not specified, `package` from AndroidManifest.xml will be used. | ||
|
||
#### `--appIdSuffix <string>` | ||
|
||
Specify an `applicationIdSuffix` to launch after build. | ||
|
||
#### `--main-activity <string>` | ||
|
||
> default: 'MainActivity' | ||
Name of the activity to start. | ||
|
||
#### `--deviceId <string>` | ||
|
||
builds your app and starts it on a specific device/simulator with the given device id (listed by running "adb devices" on the command line). | ||
|
||
#### `--no-packager` | ||
|
||
Do not launch packager while building. | ||
|
||
#### `--port <number>` | ||
|
||
> default: process.env.RCT_METRO_PORT || 8081 | ||
#### `--terminal <string>` | ||
|
||
> default: process.env.REACT_TERMINAL || process.env.TERM_PROGRAM | ||
Launches the Metro Bundler in a new window using the specified terminal path. | ||
|
||
#### `--tasks <list>` | ||
|
||
> default: 'installDebug' | ||
Run custom gradle tasks. If this argument is provided, then `--variant` option is ignored. | ||
Example: `yarn react-native run-android --tasks clean,installDebug`. | ||
|
||
#### `--active-arch-only` | ||
|
||
> default: false | ||
Build native libraries only for the current device architecture for debug builds. | ||
|
||
#### `--list-devices` | ||
|
||
> default: false | ||
List all available Android devices and simulators and let you choose one to run the app. | ||
|
||
### `build-android` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native build-android [options] | ||
``` | ||
|
||
Builds Android app. | ||
|
||
#### Options | ||
|
||
#### `--mode <string>` | ||
|
||
> default: debug | ||
Mode to build the app. Either 'debug' (default) or 'release'. | ||
|
||
#### `--extra-params <string>` | ||
|
||
Custom params that will be passed to gradle build command. | ||
Example: | ||
|
||
```sh | ||
react-native build-android --extra-params "-x lint -x test" | ||
``` | ||
|
||
#### `--binary-path <path>` | ||
|
||
Installs passed binary instead of building a fresh one. This command is not compatible with `--tasks`. | ||
|
||
### `log-android` | ||
|
||
Usage: | ||
|
||
```sh | ||
react-native log-android | ||
``` | ||
|
||
Starts [`logkitty`](https://github.com/zamotany/logkitty) displaying pretty Android logs. |
Oops, something went wrong.