Skip to content

Commit bfd43c7

Browse files
committed
Add ToC to README
Cherry-picked from 8f59cad
1 parent c3fd9ab commit bfd43c7

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

template/README.md

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
Below you will find some information on how to perform common tasks.
22
You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md).
33

4+
## Table of Contents
5+
6+
- [Sending Feedback](#sending-feedback)
7+
- [Folder Structure](#folder-structure)
8+
- [Available Scripts](#available-scripts)
9+
- [npm start](#npm-start)
10+
- [npm run build](#npm-run-build)
11+
- [npm run eject](#npm-run-eject)
12+
- [How To...](#how-to)
13+
- [Installing a Dependency](#installing-a-dependency)
14+
- [Importing a Component](#importing-a-component)
15+
- [Adding a Stylesheet](#adding-a-stylesheet)
16+
- [Post-Processing CSS](#post-processing-css)
17+
- [Adding Images and Fonts](#adding-images-and-fonts)
18+
- [Installing React Bootstrap](#installing-react-bootstrap)
19+
- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
20+
- [Adding Flow](#adding-flow)
21+
- [Deploying](#deploying)
22+
- [Something Missing?](#something-missing)
23+
424
## Sending Feedback
525

626
We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues).
@@ -74,15 +94,15 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm
7494

7595
## How To...
7696

77-
### Install a Dependency
97+
### Installing a Dependency
7898

7999
The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
80100

81101
```
82102
npm install --save <library-name>
83103
```
84104

85-
### Import a Component
105+
### Importing a Component
86106

87107
This project setup supports ES6 modules thanks to Babel.
88108
While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead.
@@ -130,7 +150,7 @@ Learn more about ES6 modules:
130150
* [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html)
131151
* [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules)
132152

133-
### Add a Stylesheet
153+
### Adding a Stylesheet
134154

135155
This project setup uses [Webpack](https://webpack.github.io/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**:
136156

@@ -162,7 +182,7 @@ In development, expressing dependencies this way allows your styles to be reload
162182

163183
If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool.
164184

165-
### Post-Process CSS
185+
### Post-Processing CSS
166186

167187
This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it.
168188

@@ -195,7 +215,7 @@ becomes this:
195215

196216
There is currently no support for preprocessors such as Less, or for sharing variables across CSS files.
197217

198-
### Add Images and Fonts
218+
### Adding Images and Fonts
199219

200220
With Webpack, using static assets like images and fonts works similarly to CSS.
201221

@@ -231,7 +251,7 @@ Please be advised that this is also a custom feature of Webpack.
231251

232252
**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images). However it may not be portable to some other environments, such as Node.js and Browserify. If you prefer to reference static assets in a more traditional way outside the module system, please let us know [in this issue](https://github.com/facebookincubator/create-react-app/issues/28), and we will consider support for this.
233253

234-
### Install React Bootstrap
254+
### Installing React Bootstrap
235255

236256
You don’t have to use React Bootstrap together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps:
237257

@@ -257,7 +277,7 @@ import { Navbar, Jumbotron, Button } from 'react-bootstrap';
257277

258278
Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap.
259279

260-
### Display Lint Output in the Editor
280+
### Displaying Lint Output in the Editor
261281

262282
>Note: this feature is available with `[email protected]` and higher.
263283
@@ -295,7 +315,7 @@ npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import esli
295315

296316
We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months.
297317

298-
### Add Flow
318+
### Adding Flow
299319

300320
Flow typing is currently [not supported out of the box](https://github.com/facebookincubator/create-react-app/issues/72) with the default `.flowconfig` generated by Flow. If you run it, you might get errors like this:
301321

@@ -351,7 +371,7 @@ module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|w
351371

352372
We will consider integrating more tightly with Flow in the future so that you don’t have to do this.
353373

354-
### Deploy
374+
### Deploying
355375

356376
#### GitHub Pages
357377

0 commit comments

Comments
 (0)