Skip to content

Commit

Permalink
FIX: Move CRA build info under it's tab page (facebook#9452)
Browse files Browse the repository at this point in the history
* FIX: Move CRA build info under it's tab page

* Add some links
  • Loading branch information
Filip Hoško authored and gaearon committed Apr 18, 2017
1 parent c578390 commit 10eaf26
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ npm start

Create React App doesn't handle backend logic or databases; it just creates a frontend build pipeline, so you can use it with any backend you want. It uses build tools like Babel and webpack under the hood, but works with zero configuration.

When you're ready to deploy to production, running `npm run build` will create an optimized build of your app in the `build` folder. You can learn more about Create React App [from its README](https://github.com/facebookincubator/create-react-app#create-react-app-) and the [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#table-of-contents).

<block class="existingapp" />

## Adding React to an Existing Application
Expand Down Expand Up @@ -162,10 +164,6 @@ To create an optimized production build with Brunch, just add the `-p` flag to t

Run Browserify with `NODE_ENV` environment variable set to `production` and use [UglifyJS](https://github.com/mishoo/UglifyJS) as the last build step so that development-only code gets stripped out.

#### Create React App

If you use [Create React App](https://github.com/facebookincubator/create-react-app), `npm run build` will create an optimized build of your app in the `build` folder.

#### Rollup

Use [rollup-plugin-replace](https://github.com/rollup/rollup-plugin-replace) plugin together with [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) (in that order) to remove development-only code. [See this gist](https://gist.github.com/Rich-Harris/cb14f4bc0670c47d00d191565be36bf0) for a complete setup example.
Expand Down Expand Up @@ -258,4 +256,4 @@ function selectTabForHashLink() {
}
}
}
</script>
</script>

0 comments on commit 10eaf26

Please sign in to comment.