Skip to content

Commit ba18e06

Browse files
committed
Tweak README with the new naming + add instructions
1 parent cea3582 commit ba18e06

File tree

1 file changed

+56
-5
lines changed

1 file changed

+56
-5
lines changed

README.md

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# React CLI
1+
# Create React App
22

33
A new blessed “getting started” experience for building SPAs in React that we can actually ship.
44

@@ -18,21 +18,72 @@ Make it easy to get started with React.
1818

1919
This is a hard constraint. We are committed to having zero configuration in the project.
2020

21-
If you use `react-cli`, you should have `src/index.js`, your bundle will be compiled to `dist/`, and it will run at http://localhost:3000 in development. You can’t change this.
21+
If you use `create-react-app`, you should have `src/index.js`, your bundle will be compiled to `build/index.html`, and it will run at http://localhost:3000 in development. You can’t change this.
2222

2323
It will have Babel, ESLint, Autprefixr and some other stuff we think it useful for getting started, but you won’t be exposed to it, and won’t be able to configure it. We curate the setup completely.
2424

2525
### Exit Strategy
2626

27-
You can say goodbye to `react-cli` at any time. Type `react-cli export`, and it will create the configs and replace the generated `scripts` in `package.json` with the equivalent "real thing" (e.g. `webpack-dev-server` and `webpack` calls). You're on your own now.
27+
You can say goodbye to `create-react-app` at any time. Type `npm run export-scripts`, and it will create the configs and replace the generated `scripts` in `package.json` with the equivalent "real thing" (e.g. `webpack-dev-server` and `webpack` calls). You're on your own now.
2828

2929
This is why "zero configuration" can work as a constraint. We can punt on many real-world features (code splitting, Google Analytics, custom Babel plugins) because we let you leave the "getting started" experience any time.
3030

31-
This makes React CLI a feasible way to get started with a "real" React project without learning the tools. Once you export, you can't go back.
31+
This makes Create React App a feasible way to get started with a "real" React project without learning the tools. Once you export, you can't go back.
3232

3333
### One Dependency
3434

35-
It works like `react-native-cli`. There is just one thing in your `devDependencies`, and it hides Babel, ESLint, and all the other stuff. But as I wrote above, you can `react-cli export` at any time.
35+
It works like `react-native-cli`. There is just one thing in your `devDependencies`, and it hides Babel, ESLint, and all the other stuff. But as I wrote above, you can `npm run exports-scripts` at any time.
3636

37+
## How to use
3738

39+
Install once:
40+
41+
```bash
42+
npm install -g create-react-app
43+
```
44+
45+
When creating a new app:
46+
47+
```
48+
create-react-app my-app
49+
cd my-app
50+
npm start
51+
```
52+
53+
Done!
54+
55+
If you want to build it for production
56+
57+
```
58+
npm run build
59+
```
60+
61+
and if you want to tweak it
62+
63+
```
64+
npm run exports-scripts # Beware, this is a one-way operation, can't go back!
65+
```
66+
67+
## How to develop it
68+
69+
You first need to
70+
71+
```
72+
npm install
73+
```
74+
75+
Once it is done, you can modify any file locally and do
76+
77+
```
78+
npm start
79+
npm run build
80+
```
81+
82+
If you want to try out the end to end flow with the global cli
83+
84+
```
85+
npm run create-react-app my-app
86+
cd my-app
87+
npm run
88+
```
3889

0 commit comments

Comments
 (0)