aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md2510
1 files changed, 2509 insertions, 1 deletions
diff --git a/README.md b/README.md
index dac1d86..2dab1ec 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2510 @@
1# JaCoCo Report Viewer 1This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2 2
3Below you will find some information on how to perform common tasks.<br>
4You can find the most recent version of this guide [here](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md).
5
6## Table of Contents
7
8- [Updating to New Releases](#updating-to-new-releases)
9- [Sending Feedback](#sending-feedback)
10- [Folder Structure](#folder-structure)
11- [Available Scripts](#available-scripts)
12 - [npm start](#npm-start)
13 - [npm test](#npm-test)
14 - [npm run build](#npm-run-build)
15 - [npm run eject](#npm-run-eject)
16- [Supported Browsers](#supported-browsers)
17- [Supported Language Features](#supported-language-features)
18- [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor)
19- [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
20- [Debugging in the Editor](#debugging-in-the-editor)
21- [Formatting Code Automatically](#formatting-code-automatically)
22- [Changing the Page `<title>`](#changing-the-page-title)
23- [Installing a Dependency](#installing-a-dependency)
24- [Importing a Component](#importing-a-component)
25- [Code Splitting](#code-splitting)
26- [Adding a Stylesheet](#adding-a-stylesheet)
27- [Adding a CSS Modules Stylesheet](#adding-a-css-modules-stylesheet)
28- [Adding a Sass Stylesheet](#adding-a-sass-stylesheet)
29- [Post-Processing CSS](#post-processing-css)
30- [Adding Images, Fonts, and Files](#adding-images-fonts-and-files)
31- [Adding SVGs](#adding-svgs)
32- [Using the `public` Folder](#using-the-public-folder)
33 - [Changing the HTML](#changing-the-html)
34 - [Adding Assets Outside of the Module System](#adding-assets-outside-of-the-module-system)
35 - [When to Use the `public` Folder](#when-to-use-the-public-folder)
36- [Using Global Variables](#using-global-variables)
37- [Adding Bootstrap](#adding-bootstrap)
38 - [Using a Custom Theme](#using-a-custom-theme)
39- [Adding Flow](#adding-flow)
40- [Adding Relay](#adding-relay)
41- [Adding a Router](#adding-a-router)
42- [Adding Custom Environment Variables](#adding-custom-environment-variables)
43 - [Referencing Environment Variables in the HTML](#referencing-environment-variables-in-the-html)
44 - [Adding Temporary Environment Variables In Your Shell](#adding-temporary-environment-variables-in-your-shell)
45 - [Adding Development Environment Variables In `.env`](#adding-development-environment-variables-in-env)
46- [Can I Use Decorators?](#can-i-use-decorators)
47- [Fetching Data with AJAX Requests](#fetching-data-with-ajax-requests)
48- [Integrating with an API Backend](#integrating-with-an-api-backend)
49 - [Node](#node)
50 - [Ruby on Rails](#ruby-on-rails)
51- [Proxying API Requests in Development](#proxying-api-requests-in-development)
52 - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy)
53 - [Configuring the Proxy Manually](#configuring-the-proxy-manually)
54- [Using HTTPS in Development](#using-https-in-development)
55- [Generating Dynamic `<meta>` Tags on the Server](#generating-dynamic-meta-tags-on-the-server)
56- [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files)
57- [Injecting Data from the Server into the Page](#injecting-data-from-the-server-into-the-page)
58- [Running Tests](#running-tests)
59 - [Filename Conventions](#filename-conventions)
60 - [Command Line Interface](#command-line-interface)
61 - [Version Control Integration](#version-control-integration)
62 - [Writing Tests](#writing-tests)
63 - [Testing Components](#testing-components)
64 - [Using Third Party Assertion Libraries](#using-third-party-assertion-libraries)
65 - [Initializing Test Environment](#initializing-test-environment)
66 - [Focusing and Excluding Tests](#focusing-and-excluding-tests)
67 - [Coverage Reporting](#coverage-reporting)
68 - [Continuous Integration](#continuous-integration)
69 - [Disabling jsdom](#disabling-jsdom)
70 - [Snapshot Testing](#snapshot-testing)
71 - [Editor Integration](#editor-integration)
72- [Debugging Tests](#debugging-tests)
73 - [Debugging Tests in Chrome](#debugging-tests-in-chrome)
74 - [Debugging Tests in Visual Studio Code](#debugging-tests-in-visual-studio-code)
75- [Developing Components in Isolation](#developing-components-in-isolation)
76 - [Getting Started with Storybook](#getting-started-with-storybook)
77 - [Getting Started with Styleguidist](#getting-started-with-styleguidist)
78- [Publishing Components to npm](#publishing-components-to-npm)
79- [Making a Progressive Web App](#making-a-progressive-web-app)
80 - [Why Opt-in?](#why-opt-in)
81 - [Offline-First Considerations](#offline-first-considerations)
82 - [Progressive Web App Metadata](#progressive-web-app-metadata)
83- [Analyzing the Bundle Size](#analyzing-the-bundle-size)
84- [Deployment](#deployment)
85 - [Static Server](#static-server)
86 - [Other Solutions](#other-solutions)
87 - [Serving Apps with Client-Side Routing](#serving-apps-with-client-side-routing)
88 - [Building for Relative Paths](#building-for-relative-paths)
89 - [Customizing Environment Variables for Arbitrary Build Environments](#customizing-environment-variables-for-arbitrary-build-environments)
90 - [Azure](#azure)
91 - [Firebase](#firebase)
92 - [GitHub Pages](#github-pages)
93 - [Heroku](#heroku)
94 - [Netlify](#netlify)
95 - [Now](#now)
96 - [S3 and CloudFront](#s3-and-cloudfront)
97 - [Surge](#surge)
98- [Advanced Configuration](#advanced-configuration)
99- [Troubleshooting](#troubleshooting)
100 - [`npm start` doesn’t detect changes](#npm-start-doesnt-detect-changes)
101 - [`npm test` hangs or crashes on macOS Sierra](#npm-test-hangs-or-crashes-on-macos-sierra)
102 - [`npm run build` exits too early](#npm-run-build-exits-too-early)
103 - [`npm run build` fails on Heroku](#npm-run-build-fails-on-heroku)
104 - [`npm run build` fails to minify](#npm-run-build-fails-to-minify)
105 - [Moment.js locales are missing](#momentjs-locales-are-missing)
106- [Alternatives to Ejecting](#alternatives-to-ejecting)
107- [Something Missing?](#something-missing)
108
109## Updating to New Releases
110
111Create React App is divided into two packages:
112
113- `create-react-app` is a global command-line utility that you use to create new projects.
114- `react-scripts` is a development dependency in the generated projects (including this one).
115
116You almost never need to update `create-react-app` itself: it delegates all the setup to `react-scripts`.
117
118When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically.
119
120To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions.
121
122In most cases bumping the `react-scripts` version in `package.json` and running `npm install` (or `yarn install`) in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes.
123
124We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly.
125
126## Sending Feedback
127
128We are always open to [your feedback](https://github.com/facebook/create-react-app/issues).
129
130## Folder Structure
131
132After creation, your project should look like this:
133
134```
135my-app/
136 README.md
137 node_modules/
138 package.json
139 public/
140 index.html
141 favicon.ico
142 src/
143 App.css
144 App.js
145 App.test.js
146 index.css
147 index.js
148 logo.svg
149```
150
151For the project to build, **these files must exist with exact filenames**:
152
153- `public/index.html` is the page template;
154- `src/index.js` is the JavaScript entry point.
155
156You can delete or rename the other files.
157
158You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.<br>
159You need to **put any JS and CSS files inside `src`**, otherwise Webpack won’t see them.
160
161Only files inside `public` can be used from `public/index.html`.<br>
162Read instructions below for using assets from JavaScript and HTML.
163
164You can, however, create more top-level directories.<br>
165They will not be included in the production build so you can use them for things like documentation.
166
167## Available Scripts
168
169In the project directory, you can run:
170
171### `npm start`
172
173Runs the app in the development mode.<br>
174Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
175
176The page will reload if you make edits.<br>
177You will also see any lint errors in the console.
178
179### `npm test`
180
181Launches the test runner in the interactive watch mode.<br>
182See the section about [running tests](#running-tests) for more information.
183
184### `npm run build`
185
186Builds the app for production to the `build` folder.<br>
187It correctly bundles React in production mode and optimizes the build for the best performance.
188
189The build is minified and the filenames include the hashes.<br>
190Your app is ready to be deployed!
191
192See the section about [deployment](#deployment) for more information.
193
194### `npm run eject`
195
196**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
197
198If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
199
200Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
201
202You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
203
204## Supported Browsers
205
206By default, the generated project supports all modern browsers.<br>
207Support for Internet Explorer 9, 10, and 11 requires [polyfills](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md).
208
209### Supported Language Features
210
211This project supports a superset of the latest JavaScript standard.<br>
212In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports:
213
214- [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016).
215- [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017).
216- [Object Rest/Spread Properties](https://github.com/tc39/proposal-object-rest-spread) (ES2018).
217- [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal)
218- [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (part of stage 3 proposal).
219- [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flow.org/) syntax.
220
221Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-).
222
223While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future.
224
225Note that **this project includes no [polyfills](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md)** by default.
226
227If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are [including the appropriate polyfills manually](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md), or that the browsers you are targeting already support them.
228
229## Syntax Highlighting in the Editor
230
231To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered.
232
233## Displaying Lint Output in the Editor
234
235> Note: this feature is available with `react-scripts@0.2.0` and higher.<br>
236> It also only works with npm 3 or higher.