Skip to content

Commit e146440

Browse files
authored
Update docs for v2.0.0 (expo#768)
1 parent 69fa26f commit e146440

File tree

7 files changed

+74
-166
lines changed

7 files changed

+74
-166
lines changed

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
## 2.0.0 (September 21, 2018)
2+
3+
This release merges Create React Native App with Expo CLI.
4+
5+
* **Expo CLI is a tool based on CRNA, made by the same team**
6+
* **It has all the same features, plus some additional benefits**
7+
* **Like CRNA, Expo CLI does not require an Expo user account**
8+
* **The `create-react-native-app` command will continue to work**
9+
10+
The separate `react-native-scripts` package is now deprecated: new projects created with `create-react-native-app` will use Expo CLI instead of `react-native-scripts`. In addition to everything provided by CRNA, Expo CLI includes these extras:
11+
12+
* **Web-based user interface:** in addition to the CLI, there's a GUI where you can view logs, launch the app on your devices or simulators, and publish updates.
13+
* **Standalone app builds:** you can build IPA and APK packages for deploying to App Store and Play Store without using Xcode or Android Studio.
14+
* **Publishing:** you can push updates to your deployed apps and optionally publish your app to Expo.io.
15+
* **Tunnel:** your physical device doesn’t need to be in the same wi-fi as your computer to be able to develop using it.
16+
* **Optional user accounts:** logging in allows listing all your projects in development in the Expo app without having to scan any QR codes and enables additional features like standalone builds. However, just like CRNA, Expo CLI can also be used without a user account.
17+
18+
### Why are we bringing these two tools together?
19+
20+
* **Just one tool to learn:** previously developers would start with CRNA and then switch to exp or XDE for additional features like standalone builds. Expo CLI is as easy to get started with as CRNA, but also supports everything previously offered by these separate tools.
21+
* **Less confusing options:** CRNA apps have always been loaded using the Expo app and able to use the Expo APIs in addition to the core React Native APIs. Users are sometimes confused about the differences between plain React Native, CRNA and Expo apps created with tools like exp or XDE. Installing the expo-cli package will make it clearer the additional functionality is provided by Expo.
22+
* **Developer experience:** Expo CLI is ahead of CRNA in terms of features and developer experience, and we’re continuously improving it.
23+
* **Maintenance:** having these two projects as separate codebases requires more maintenance and CRNA has previously falled behind because of this. A single codebase helps us keep it up to date and fix issues as fast as possible.
24+
25+
### Upgrading from 1.14.0 to 2.0.0
26+
27+
All apps created with `create-react-native-app`, are compatible with Expo CLI without changes.
28+
29+
Upgrade `react-native-scripts` to v2.0.0 with:
30+
```
31+
npm install --save --save-exact [email protected]
32+
```
33+
or
34+
```
35+
yarn add --exact [email protected]
36+
```
37+
When you run `npm start` for the first time, Expo CLI will be installed.
38+
39+
**Because `react-native-scripts` is now a wrapper for Expo CLI, you can also follow these steps to remove it from your project and use Expo CLI directly:**
40+
41+
1. Replace `react-native-scripts` with `expo` in the `scripts` config in `package.json`. Example:
42+
```
43+
"scripts": {
44+
"start": "expo start",
45+
"eject": "expo eject",
46+
"android": "expo start --android",
47+
"ios": "expo start --ios",
48+
"test": "jest"
49+
}
50+
```
51+
2. Remove `react-native-scripts` from `devDependencies`.
52+
153
## 1.14.0 (April 27, 2018)
254
355
Update Expo SDK 27.

CONTRIBUTING.md

Lines changed: 3 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,5 @@
1-
# WARNING
1+
# Contributing to CRNA / Expo CLI
22

3-
This doc is woefully under-written and needs to be fleshed out. If you're interested in hacking on Create React Native App but aren't finding this information to be enough, please contact a maintainer or open an issue.
3+
From version v2.0.0, Create React Native App has been merged with Expo CLI.
44

5-
## Developing
6-
7-
Run `yarn` in the repo root to install prettier. Use `yarn run format` before submitting any PRs to ensure consistent code style.
8-
9-
You'll need to install dependencies in both `create-react-native-app` and `react-native-scripts` and also start the watchers in both. It's also a good idea to tell npm/yarn that your local copy of react-native-scripts can be linked into projects where it's a dependency:
10-
11-
```
12-
# you may need to yarn unlink react-native-scripts before this will work
13-
$ cd path-to-repo-root/react-native-scripts
14-
$ yarn link
15-
```
16-
17-
### Creating a test project
18-
19-
If you're trying to make a change to the behavior of the init process, then you'll need to do something like this:
20-
21-
```
22-
# replace the paths appropriately, and also the react-native-scripts version number
23-
$ cd path-to-repo-root/react-native-scripts && npm pack
24-
$ cd path-to-project-dir
25-
26-
# you may need to run yarn cache clean here if you've previously done this with a different tarball
27-
$ path-to-repo-root/create-react-native-app/build/index.js testing-my-change \
28-
--scripts-version path-to-repo-root/react-native-scripts/react-native-scripts-0.1.0.tgz
29-
$ cd testing-my-change
30-
$ yarn link react-native-scripts
31-
```
32-
33-
Otherwise, just create the app from the npm packages and you can link your modified scripts in afterwards:
34-
35-
```
36-
$ cd path-to-project-dir
37-
$ create-react-native-app testing-my-change
38-
```
39-
40-
### Linking react-native-scripts
41-
42-
Once your test project is initialized (whether using your custom init change or not), you'll need to link back to react-native-scripts to see any changes you make:
43-
44-
```
45-
$ cd path-to-project-dir/testing-my-change
46-
$ yarn link react-native-scripts
47-
```
48-
49-
Once this is linked and the watcher is running, you should be able to see any changes you make to the project scripts when you run them inside your test project.
50-
51-
## Working on dependencies of react-native-scripts
52-
53-
If you're testing changes to one of react-native-scripts' dependencies (say, xdl), then if you've linked that local version of the dependency into your test project, you may run into haste module clashes when running the React Native packager. If you do run into these issues, then you'll need to tell the packager how to ignore any duplicate dependencies it pulls in as a result of seeing both original and compiled source directories.
54-
55-
You'll specify a CLI config file in your test project's app.json:
56-
57-
```
58-
{
59-
"expo": {
60-
"sdkVersion": "12.0.0",
61-
"packagerOpts": {
62-
"config": "rn-cli.config.js"
63-
}
64-
}
65-
}
66-
```
67-
68-
And place a file like this in the root of your test project:
69-
70-
```
71-
// rn-cli.config.js
72-
73-
'use strict';
74-
75-
var blacklist = require('react-native/packager/blacklist');
76-
77-
var toExport = {
78-
getBlacklistRE() {
79-
// this is an example using xdl, replace with any uncompiled source directories that are
80-
// causing haste module conflicts
81-
var subList = [
82-
/xdl\/src\/.*/
83-
];
84-
85-
// these statements are just to confirm that you've cleared the cache and
86-
// that the new blacklists are being picked up
87-
var list = blacklist(subList);
88-
console.log(`RN-CLI.CONFIG.JS: passing ${list} to RN packager as blacklist`);
89-
return list;
90-
},
91-
};
92-
93-
module.exports = toExport;
94-
```
95-
96-
Once you've set these up, make sure to run `$ node_modules/react-native/packager/packager.sh --reset-cache` and exit it once the packager is loaded before you try any npm/yarn commands again. This will make sure that the new CLI config is picked up.
5+
Please see [Contributing to Expo CLI](https://github.com/expo/expo-cli/blob/master/CONTRIBUTING.md) in the Expo CLI monorepo for instructions on contributing to Expo CLI.

EJECTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Also, please note that if you did make use of any Expo APIs before ejecting, you
3636

3737
Using ExpoKit will allow you to continue using Expo APIs along with building your own native code, but it requires an Expo account and use of Expo developer tools.
3838

39-
Because this ejection process essentially produces a custom build of the Expo client app, you don't need to modify any of your app's code, but you do still need to have an Xcode/Android Studio environment, along with `react-native-cli` and either [Expo XDE](https://docs.expo.io/versions/latest/introduction/installation.html) or [`exp`](https://docs.expo.io/versions/latest/guides/exp-cli.html).
39+
Because this ejection process essentially produces a custom build of the Expo client app, you don't need to modify any of your app's code, but you do still need to have an Xcode/Android Studio environment, along with `react-native-cli` and [Expo CLI](https://docs.expo.io/versions/latest/guides/expo-cli.html).
4040

4141
## Specific Motivations
4242

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,27 @@
44
Create React Native apps with no build configuration.
55

66
* [Getting Started](#getting-started)
7-
* [User Guide](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md)
87

98
Once you're up and running with Create React Native App, visit [this tutorial](https://facebook.github.io/react-native/docs/tutorial.html) for more information on building apps with React Native.
109

10+
**Note: Create React Native App has been merged with Expo CLI** You can now use `expo init` to create your project. See [Quick Start](https://docs.expo.io/versions/latest/) in the Expo documentation for instructions on getting started using Expo CLI.
11+
12+
The `create-react-native-app` command is provided for backwards compatibility.
13+
14+
If you created your app using `create-react-native-app`, it's already compatible with Expo CLI. See [upgrade instructions](https://github.com/react-community/create-react-native-app/blob/master/CHANGELOG.md#upgrading-from-1140-to-200).
15+
1116
## Quick Overview
1217

1318
Make sure you have Node v6 or later installed. No Xcode or Android Studio installation is required.
1419

1520
```sh
16-
$ npm install -g create-react-native-app
17-
$ create-react-native-app my-app
21+
$ npm install -g expo-cli
22+
$ expo init my-app
1823
$ cd my-app/
1924
$ npm start
2025
```
2126

22-
Install the [Expo](https://expo.io) app on your iOS or Android phone, and use the QR code in the terminal to open your app. Find the QR scanner on the Projects tab of the app. When you're ready to share your project with others (for example, by deploying to an app store), read the [Sharing & Deployment](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#sharing-and-deployment) section of the User Guide.
27+
Install the [Expo](https://expo.io) app on your iOS or Android phone, and use the QR code in the terminal to open your app. Find the QR scanner on the Projects tab of the app. When you're ready to share your project with others (for example, by deploying to an app store), see ["How do I share my Expo project?"](https://docs.expo.io/versions/latest/introduction/faq#how-do-i-share-my-expo-project) in the Frequently Asked Questions.
2328

2429
Create React Native App allows you to work with all of the [Components and APIs](https://facebook.github.io/react-native/docs/getting-started.html) in React Native, as well as most of the [JavaScript APIs](https://docs.expo.io/versions/latest/sdk/index.html) that the Expo App provides.
2530

@@ -35,23 +40,14 @@ Create React Native App allows you to work with all of the [Components and APIs]
3540

3641
### Installation
3742

38-
Install it once globally:
39-
40-
```sh
41-
$ npm install -g create-react-native-app
42-
# or
43-
$ yarn global add create-react-native-app
44-
```
45-
46-
You'll need to have Node v6 or later on your machine. We strongly recommend using npm v3, v4, or a recent version of Yarn. Create React Native App does not currently work with npm v5 due to bugs in npm ([you can track the issue here](https://github.com/react-community/create-react-native-app/issues/233#issuecomment-305638103)).
43+
See [Installation](https://docs.expo.io/versions/latest/introduction/installation).
4744

4845
### Creating an App
4946

5047
To create a new app, run:
5148

5249
```sh
53-
$ create-react-native-app my-app
54-
$ cd my-app
50+
expo init
5551
```
5652

5753
This will create a directory called `my-app` inside the current working directory. Inside `my-app`, this will generate the initial project structure and install all of its dependencies.
@@ -93,10 +89,10 @@ This will start the process of "ejecting" from Create React Native App's build s
9389

9490
If you're having issues with Create React Native App, please make sure:
9591

96-
* The issue is not covered in the [Getting Started](https://github.com/react-community/create-react-native-app#getting-started) or [User Guide](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md) documentation
97-
* There is not already an [open issue](https://github.com/react-community/create-react-native-app/issues) for your particular problem
92+
* The issue is not covered in the [Expo Docs](https://docs.expo.io/versions/latest/)
93+
* There is not already an [open issue](https://github.com/expo/expo-cli/issues) for your particular problem
9894

99-
If you've checked the documentation and currently open issues, please either open a new GitHub issue, [find @dika10sune on Twitter](https://twitter.com/dika10sune), or ping `dikaiosune` on [Reactiflux](https://www.reactiflux.com/)'s #react-native channel on Discord. **Please do not DM or email project maintainers directly**, as it's very important that support takes place in public locations where others can benefit from the conversation.
95+
If you've checked the documentation and currently open issues, please either [open a new GitHub issue](https://github.com/expo/expo-cli/issues/new) or ask a question on [Expo forums](https://forums.expo.io/c/help). **Please do not DM or email project maintainers directly**, as it's very important that support takes place in public locations where others can benefit from the conversation.
10096

10197
## FAQs
10298

@@ -120,9 +116,9 @@ If you need to build IPAs and APKs for publishing to the App Store and/or Play S
120116

121117
## Contributing
122118

123-
Contributions will be licensed under the [3-clause BSD license](https://github.com/react-community/create-react-native-app/blob/master/LICENSE). Please fork the repository, perform your work on a feature branch, and submit a pull request to this repository's master branch from your fork's branch.
119+
From version v2.0.0, Create React Native App has been merged with Expo CLI.
124120

125-
For details about setting up a development environment and testing your changes, please see [CONTRIBUTING.md](https://github.com/react-community/create-react-native-app/blob/master/CONTRIBUTING.md).
121+
Please see [Contributin to Expo CLI](https://github.com/expo/expo-cli/blob/master/CONTRIBUTING.md) in the Expo CLI monorepo for instructions on contributing to Expo CLI.
126122

127123
## Contributors
128124

RELEASES.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

VERSIONS.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
# Versions
22

3-
Apps built with Create React Native App rely on three project dependencies:
3+
Apps created with Create React Native App rely on three project dependencies:
44

55
* `react-native` provides the core React Native functionality
66
* `react` is a peer dependency of `react-native`
77
* `expo` makes CRNA projects compatible with the Expo client app, and also provides access to several native APIs through JavaScript
88

99
The `app.json` file in a CRNA project also specifies `sdkVersion` which is necessary for the Expo client to provide the correct native API versions.
1010

11-
Each version of these dependencies is only compatible with a narrow version range of the other two. See the below table for the correct versions to use with each other (oldest first):
12-
13-
| `react-native` | `react` | `expo` | `sdkVersion` in app.json |
14-
|----------------|-----------------|--------|--------------------------|
15-
| 0.46.x | 16.0.0-alpha.12 | 19.x.x | `"19.0.0"` |
16-
| 0.47.x | 16.0.0-alpha.12 | 20.x.x | `"20.0.0"` |
17-
| 0.48.x | 16.0.0-alpha.12 | 21.x.x | `"21.0.0"` |
18-
| 0.49.x | 16.0.0-beta.5 | 22.x.x | `"22.0.0"` |
19-
| 0.50.x | 16.0.0 | 23.x.x | `"23.0.0"` |
20-
| 0.51.x | 16.0.0 | 24.x.x | `"24.0.0"` |
21-
| 0.52.x | 16.2.0 | 25.x.x | `"25.0.0"` |
22-
| 0.54.x | 16.3.0-alpha.1 | 26.x.x | `"26.0.0"` |
23-
| 0.55.x | 16.3.1 | 27.x.x | `"27.0.0"` |
11+
Each version of these dependencies is only compatible with a narrow version range of the other two. See [SDK version](https://docs.expo.io/versions/latest/sdk/#sdk-version) in the Expo docs for a list of Expo SDK versions and corresponding React Native versions.

react-native-scripts/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ The README for this package is hosted at https://github.com/react-community/crea
55
## Development
66

77
`yarn && yarn start` will start a watcher that will build artifacts and place them in the build directory.
8-
9-
*Warning*: if you change the template project's dependencies, make sure to update `checkAppName` in `create-react-native-app/src/index.js`.

0 commit comments

Comments
 (0)