Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

Commit 733028c

Browse files
authored
Update docs for create-react-app 3.x
1 parent 3018570 commit 733028c

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

README.md

+5-17
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,9 @@ Ensure [requirements](#user-content-requires) are met, then execute the followin
6464
✏️ *Replace `$APP_NAME` with the name for your unique app.*
6565

6666
```bash
67-
npx create-react-app@2.x $APP_NAME
67+
npx create-react-app@3.x $APP_NAME
6868
cd $APP_NAME
69-
git init
7069
heroku create $APP_NAME --buildpack mars/create-react-app
71-
git add .
72-
git commit -m "Start with create-react-app"
7370
git push heroku master
7471
heroku open
7572
```
@@ -87,21 +84,14 @@ Usage
8784
✏️ *Replace `$APP_NAME` with the name for your unique app.*
8885

8986
```bash
90-
npx create-react-app@2.x $APP_NAME
87+
npx create-react-app@3.x $APP_NAME
9188
cd $APP_NAME
9289
```
9390

91+
* as of create-react-app v3, it automatically performs `git init` and an initial commit
9492
* [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f)
9593
* if [yarn](https://yarnpkg.com) is installed locally, the new app will use it instead of [npm](https://www.npmjs.com)
9694

97-
### Make it a git repo
98-
99-
```bash
100-
git init
101-
```
102-
103-
At this point, this new repo is local, only on your computer. Eventually, you may want to [push to Github](#user-content-push-to-github).
104-
10595
### Create the Heroku app
10696

10797
✏️ *Replace `$APP_NAME` with the name for your unique app.*
@@ -116,11 +106,9 @@ This command:
116106
* sets the app to use this [buildpack](https://devcenter.heroku.com/articles/buildpacks)
117107
* configures the [`heroku` git remote](https://devcenter.heroku.com/articles/git#creating-a-heroku-remote) in the local repo, so `git push heroku master` will push to this new Heroku app.
118108

119-
### Commit & deploy ♻️
109+
### Deploy ♻️
120110

121111
```bash
122-
git add .
123-
git commit -m "Start with create-react-app"
124112
git push heroku master
125113
```
126114

@@ -146,7 +134,7 @@ Find the app on [your dashboard](https://dashboard.heroku.com).
146134

147135
Work with your app locally using `npm start`. See: [create-react-app docs](https://github.com/facebookincubator/create-react-app#getting-started)
148136

149-
Then, commit & deploy ♻️
137+
Then, `git commit` your changes & `git push heroku master` ♻️
150138

151139
### Push to Github
152140

0 commit comments

Comments
 (0)