You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ All work on React Native CLI happens directly on GitHub. Contributors send pull
16
16
> Please make sure the version of React Native matches the one present in devDependencies of the CLI. Otherwise, you may get unexpected errors.
17
17
18
18
_Note: you must use the `--watchFolders` flag with the `start` command when testing the CLI with `yarn link` like this. Otherwise Metro can't find the symlinked folder and this may result in errors such as `ReferenceError: SHA-1 for file ... is not computed`. If you are experiencing this error while using Release configuration, please add `watchFolders: ["path/to/cloned/cli/"]` to your `metro.config.js` file._
19
+
19
20
### Setup
20
21
21
22
Because of a modular design of the CLI, we recommend developing using symbolic links to its packages. This way you can use it seamlessly in the tested project, as you'd use the locally installed CLI. Here's what you need to run in the terminal:
@@ -66,7 +67,7 @@ First make sure you have RN repo checked out and CLI repo checked out and built.
66
67
67
68
1. Check out `react-native` repo. Then update template in local `react-native/template/package.json`, replacing dependency version of `react-native` with the absolute path of the react native repo, for example: "react-native": "file:///Users/username/react-native" (you can find the absolute path using `pwd` command)
68
69
69
-
1. Go back up and create a new RN project: `node ./cli/packages/cli/build/bin.js init --template=file:///path/to/local/react-nativeRNTestProject`
70
+
1. Go back up and create a new RN project: `node ./cli/packages/cli/build/bin.js init --template=file:///path/to/local/react-native/RNTestProject`
70
71
71
72
1. To work with android, update gradle config in the newly created project following the second part of [Christoph's instructions](https://gist.github.com/cpojer/38a91f90614f35769e88410e3a387b48)
Copy file name to clipboardExpand all lines: docs/healthChecks.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Health Check Plugins
2
2
3
-
Plugins can be used to extend the health checks that `react-native doctor` runs. This can be used to add additional checks for out of tree platforms, or other checks that are specific to a community module.
3
+
Plugins can be used to extend the health checks that `npx react-native doctor` runs. This can be used to add additional checks for out of tree platforms, or other checks that are specific to a community module.
4
4
5
5
See [`Plugins`](./plugins.md) for information about how plugins work.
Copy file name to clipboardExpand all lines: docs/init.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,27 @@ There are couple of ways to initialize new React Native projects.
4
4
5
5
### For `react-native@0.60.0` or greater
6
6
7
-
#### Using `npx` utility:
7
+
#### Using `npx` utility
8
8
9
9
```sh
10
-
npx react-native init ProjectName
10
+
npx react-native@latest init ProjectName
11
11
```
12
12
13
13
> Note: If you have both `yarn` and `npm` installed on your machine, React Native CLI will always try to use `yarn`, so even if you use `npx` utility, only `react-native` executable will be installed using `npm` and the rest of the work will be delegated to `yarn`. You can force usage of `npm` adding `--npm` flag to the command.
14
14
15
15
> Note: for Yarn users, `yarn dlx` command similar to `npx` will be featured in Yarn 2.0: <https://github.com/yarnpkg/berry/pull/40> so we’ll be able to use it in a similar fashion.
16
16
17
-
#### Installing `react-native` and invoking `init` command:
17
+
#### Installing `react-native` and invoking `init` command
Copy file name to clipboardExpand all lines: docs/plugins.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Plugin is a JavaScript package that extends built-in React Native CLI features. It can provide an array of additional commands to run or platforms to target.
4
4
5
-
For example, `react-native-windows` package is a plugin that provides `react-native run-windows` command and `windows` platform.
5
+
For example, `react-native-windows` package is a plugin that provides `run-windows` command and `windows` platform.
6
6
7
7
Details of this particular integration as well as how to provide an additional platform for React Native were described in a [`dedicated section`](./platforms.md) about platforms.
8
8
@@ -21,13 +21,13 @@ module.exports = {
21
21
};
22
22
```
23
23
24
-
> Above is an example of a plugin that exports a command named `foo-command` that can be executed with `react-native foo-command` and logs "It worked" and exits.
24
+
> Above is an example of a plugin that exports a command named `foo-command` that can be executed with `npx react-native foo-command` and logs "It worked" and exits.
25
25
26
26
At the startup, React Native CLI reads configuration from all dependencies listed in `package.json` and reduces them into a single configuration.
27
27
28
28
At the end, an array of commands concatenated from all plugins is passed on to the CLI to be loaded after built-in commands.
29
29
30
-
> See [`healthChecks`](./healthChecks.md) for information on how plugins can provide additional health checks for `react-native doctor`.
30
+
> See [`healthChecks`](./healthChecks.md) for information on how plugins can provide additional health checks for `npx react-native doctor`.
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.
0 commit comments