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: README.md
+32-30
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
Create React apps with no build configuration.
4
4
5
-
*[Creating an App](#creating-an-app) – How to create a new app.
6
-
*[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
5
+
-[Creating an App](#creating-an-app) – How to create a new app.
6
+
-[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
7
7
8
8
Create React App works on macOS, Windows, and Linux.<br>
9
9
If something doesn’t work, please [file an issue](https://github.com/facebook/create-react-app/issues/new).
@@ -16,7 +16,7 @@ cd my-app
16
16
npm start
17
17
```
18
18
19
-
*([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))*
19
+
_([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))_
20
20
21
21
Then open [http://localhost:3000/](http://localhost:3000/) to see your app.<br>
22
22
When you’re ready to deploy to production, create a minified bundle with `npm run build`.
@@ -44,21 +44,23 @@ To create a new app, you may choose one of the following methods:
44
44
npx create-react-app my-app
45
45
```
46
46
47
-
*([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))*
47
+
_([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))_
48
48
49
49
### npm
50
50
51
51
```sh
52
52
npm init react-app my-app
53
53
```
54
-
*`npm init <initializer>` is available in npm 6+*
54
+
55
+
_`npm init <initializer>` is available in npm 6+_
55
56
56
57
### Yarn
57
58
58
59
```sh
59
60
yarn create react-app my-app
60
61
```
61
-
*`yarn create` is available in Yarn 0.25+*
62
+
63
+
_`yarn create` is available in Yarn 0.25+_
62
64
63
65
It will create a directory called `my-app` inside the current folder.<br>
64
66
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
@@ -173,24 +175,24 @@ Please refer to the [User Guide](https://github.com/facebook/create-react-app/bl
173
175
174
176
## Philosophy
175
177
176
-
***One Dependency:** There is just one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
178
+
-**One Dependency:** There is just one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
177
179
178
-
***No Configuration Required:** You don't need to configure anything. Reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
180
+
-**No Configuration Required:** You don't need to configure anything. Reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
179
181
180
-
***No Lock-In:** You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.
182
+
-**No Lock-In:** You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.
181
183
182
184
## What’s Included?
183
185
184
186
Your environment will have everything you need to build a modern single-page React app:
185
187
186
-
* React, JSX, ES6, and Flow syntax support.
187
-
* Language extras beyond ES6 like the object spread operator.
188
-
* Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes.
189
-
* A fast interactive unit test runner with built-in support for coverage reporting.
190
-
* A live development server that warns about common mistakes.
191
-
* A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.
192
-
* An offline-first [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) and a [web app manifest](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/), meeting all the [Progressive Web App](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) criteria. (*Note: Using the service worker is opt-in as of `[email protected]` and higher*)
193
-
* Hassle-free updates for the above tools with a single dependency.
188
+
- React, JSX, ES6, and Flow syntax support.
189
+
- Language extras beyond ES6 like the object spread operator.
190
+
- Autoprefixed CSS, so you don’t need `-webkit-` or other prefixes.
191
+
- A fast interactive unit test runner with built-in support for coverage reporting.
192
+
- A live development server that warns about common mistakes.
193
+
- A build script to bundle JS, CSS, and images for production, with hashes and sourcemaps.
194
+
- An offline-first [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) and a [web app manifest](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/), meeting all the [Progressive Web App](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) criteria. (_Note: Using the service worker is opt-in as of `[email protected]` and higher_)
195
+
- Hassle-free updates for the above tools with a single dependency.
194
196
195
197
Check out [this guide](https://github.com/nitishdayal/cra_closer_look) for an overview of how these tools fit together.
196
198
@@ -200,25 +202,25 @@ The tradeoff is that **these tools are preconfigured to work in a specific way**
200
202
201
203
Create React App is a great fit for:
202
204
203
-
***Learning React** in a comfortable and feature-rich development environment.
204
-
***Starting new single-page React applications.**
205
-
***Creating examples** with React for your libraries and components.
205
+
-**Learning React** in a comfortable and feature-rich development environment.
206
+
-**Starting new single-page React applications.**
207
+
-**Creating examples** with React for your libraries and components.
206
208
207
209
Here’s a few common cases where you might want to try something else:
208
210
209
-
* If you want to **try React** without hundreds of transitive build tool dependencies, consider [using a single HTML file or an online sandbox instead](https://reactjs.org/docs/try-react.html).
211
+
- If you want to **try React** without hundreds of transitive build tool dependencies, consider [using a single HTML file or an online sandbox instead](https://reactjs.org/docs/try-react.html).
210
212
211
-
* If you need to **integrate React code with a server-side template framework** like Rails or Django, or if you’re **not building a single-page app**, consider using [nwb](https://github.com/insin/nwb), or [Neutrino](https://neutrino.js.org/) which are more flexible. For Rails specifically, you can use [Rails Webpacker](https://github.com/rails/webpacker).
213
+
- If you need to **integrate React code with a server-side template framework** like Rails or Django, or if you’re **not building a single-page app**, consider using [nwb](https://github.com/insin/nwb), or [Neutrino](https://neutrino.js.org/) which are more flexible. For Rails specifically, you can use [Rails Webpacker](https://github.com/rails/webpacker).
212
214
213
-
* If you need to **publish a React component**, [nwb](https://github.com/insin/nwb) can [also do this](https://github.com/insin/nwb#react-components-and-libraries), as well as [Neutrino's react-components preset](https://neutrino.js.org/packages/react-components/).
215
+
- If you need to **publish a React component**, [nwb](https://github.com/insin/nwb) can [also do this](https://github.com/insin/nwb#react-components-and-libraries), as well as [Neutrino's react-components preset](https://neutrino.js.org/packages/react-components/).
214
216
215
-
* If you want to do **server rendering** with React and Node.js, check out [Next.js](https://github.com/zeit/next.js/) or [Razzle](https://github.com/jaredpalmer/razzle). Create React App is agnostic of the backend, and just produces static HTML/JS/CSS bundles.
217
+
- If you want to do **server rendering** with React and Node.js, check out [Next.js](https://github.com/zeit/next.js/) or [Razzle](https://github.com/jaredpalmer/razzle). Create React App is agnostic of the backend, and just produces static HTML/JS/CSS bundles.
216
218
217
-
* If your website is **mostly static** (for example, a portfolio or a blog), consider using [Gatsby](https://www.gatsbyjs.org/) instead. Unlike Create React App, it pre-renders the website into HTML at the build time.
219
+
- If your website is **mostly static** (for example, a portfolio or a blog), consider using [Gatsby](https://www.gatsbyjs.org/) instead. Unlike Create React App, it pre-renders the website into HTML at the build time.
218
220
219
-
* If you want to use **TypeScript**, consider using [create-react-app-typescript](https://github.com/wmonk/create-react-app-typescript).
221
+
- If you want to use **TypeScript**, consider using [create-react-app-typescript](https://github.com/wmonk/create-react-app-typescript).
220
222
221
-
* Finally, if you need **more customization**, check out [Neutrino](https://neutrino.js.org/) and its [React preset](https://neutrino.js.org/packages/react/).
223
+
- Finally, if you need **more customization**, check out [Neutrino](https://neutrino.js.org/) and its [React preset](https://neutrino.js.org/packages/react/).
222
224
223
225
All of the above tools can work with little to no configuration.
224
226
@@ -237,9 +239,9 @@ Check out [Create React Native App](https://github.com/react-community/create-re
237
239
238
240
We are grateful to the authors of existing related projects for their ideas and collaboration:
Copy file name to clipboardExpand all lines: packages/babel-preset-react-app/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@
3
3
This package includes the Babel preset used by [Create React App](https://github.com/facebook/create-react-app).<br>
4
4
Please refer to its documentation:
5
5
6
-
*[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
-
*[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
6
+
-[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
+
-[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
This package exports a list of globals that are often used by mistake. You can feed this list to a static analysis tool like ESLint to prevent their usage without an explicit `window.` qualifier.
20
20
21
-
22
21
## Installation
23
22
24
23
```
25
24
npm install --save confusing-browser-globals
26
25
```
27
26
28
-
29
27
## Usage
30
28
31
29
If you use Create React App, you don't need to configure anything, as this rule is already included in the default `eslint-config-react-app` preset.
@@ -38,11 +36,10 @@ var restrictedGlobals = require('confusing-browser-globals');
Copy file name to clipboardExpand all lines: packages/create-react-app/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -3,5 +3,5 @@
3
3
This package includes the global command for [Create React App](https://github.com/facebook/create-react-app).<br>
4
4
Please refer to its documentation:
5
5
6
-
*[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
-
*[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
6
+
-[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
+
-[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
Copy file name to clipboardExpand all lines: packages/eslint-config-react-app/README.md
+17-17
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@
3
3
This package includes the shareable ESLint configuration used by [Create React App](https://github.com/facebook/create-react-app).<br>
4
4
Please refer to its documentation:
5
5
6
-
*[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
-
*[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
6
+
-[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
+
-[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
8
8
9
9
## Usage in Create React App Projects
10
10
@@ -18,19 +18,19 @@ If you want to use this ESLint configuration in a project not built with Create
18
18
19
19
First, install this package, ESLint and the necessary plugins.
Then create a file named `.eslintrc` with following contents in the root folder of your project:
26
26
27
-
```js
28
-
{
29
-
"extends":"react-app"
30
-
}
31
-
```
27
+
```js
28
+
{
29
+
"extends":"react-app"
30
+
}
31
+
```
32
32
33
-
That's it! You can override the settings from `eslint-config-react-app` by editing the `.eslintrc` file. Learn more about [configuring ESLint](http://eslint.org/docs/user-guide/configuring) on the ESLint website.
33
+
That's it! You can override the settings from `eslint-config-react-app` by editing the `.eslintrc` file. Learn more about [configuring ESLint](http://eslint.org/docs/user-guide/configuring) on the ESLint website.
34
34
35
35
## Accessibility Checks
36
36
@@ -57,11 +57,11 @@ The following rules from the [eslint-plugin-jsx-a11y](https://github.com/evcohen
57
57
58
58
If you want to enable even more accessibility rules, you can create an `.eslintrc` file in the root of your project with this content:
However, if you are using [Create React App](https://github.com/facebook/create-react-app) and have not ejected, any additional rules will only be displayed in the [IDE integrations](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor), but not in the browser or the terminal.
Copy file name to clipboardExpand all lines: packages/react-scripts/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -3,5 +3,5 @@
3
3
This package includes scripts and configuration used by [Create React App](https://github.com/facebook/create-react-app).<br>
4
4
Please refer to its documentation:
5
5
6
-
*[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
-
*[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
6
+
-[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
7
+
-[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
0 commit comments