|
| 1 | +# CodeRoad Tutorial React Starter |
| 2 | + |
| 3 | +This project is a working starter boilerplate for a React based CodeRoad tutorial. |
| 4 | + |
| 5 | +See [instructions for reverting back](#Revert-to-Create-React-App) to its original [Create React App](https://github.com/facebook/create-react-app) template. |
| 6 | + |
| 7 | +## Available Scripts |
| 8 | + |
| 9 | +In the project directory, you can run: |
| 10 | + |
| 11 | +### `yarn start` |
| 12 | + |
| 13 | +Runs the app in the development mode.<br /> |
| 14 | +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
| 15 | + |
| 16 | +The page will reload if you make edits.<br /> |
| 17 | +You will also see any lint errors in the console. |
| 18 | + |
| 19 | +### `yarn test` |
| 20 | + |
| 21 | +Launches the test runner in the interactive watch mode.<br /> |
| 22 | +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. |
| 23 | + |
| 24 | +### `yarn build` |
| 25 | + |
| 26 | +Builds the app for production to the `build` folder.<br /> |
| 27 | +It correctly bundles React in production mode and optimizes the build for the best performance. |
| 28 | + |
| 29 | +The build is minified and the filenames include the hashes.<br /> |
| 30 | +Your app is ready to be deployed! |
| 31 | + |
| 32 | +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
| 33 | + |
| 34 | +## Learn More |
| 35 | + |
| 36 | +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). |
| 37 | + |
| 38 | +To learn React, check out the [React documentation](https://reactjs.org/). |
| 39 | + |
| 40 | +### Code Splitting |
| 41 | + |
| 42 | +This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting |
| 43 | + |
| 44 | +### Analyzing the Bundle Size |
| 45 | + |
| 46 | +This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size |
| 47 | + |
| 48 | +### Making a Progressive Web App |
| 49 | + |
| 50 | +This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app |
| 51 | + |
| 52 | +### Advanced Configuration |
| 53 | + |
| 54 | +This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration |
| 55 | + |
| 56 | +### Deployment |
| 57 | + |
| 58 | +This section has moved here: https://facebook.github.io/create-react-app/docs/deployment |
| 59 | + |
| 60 | +### `yarn build` fails to minify |
| 61 | + |
| 62 | +This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify |
| 63 | + |
| 64 | +## Revert to Create-React-App |
| 65 | + |
| 66 | +This project is slightly modified from the original create-react-app config in order to integrate with CodeRoad's testing tools. See react-app-rewired for details on how these modifications are implemented: https://github.com/timarney/react-app-rewired. |
| 67 | + |
| 68 | +If you're done with your CodeRoad course, feel free to revert back. Just follow the instructions below: |
| 69 | + |
| 70 | +1. delete the following file: `config.overrides.js` |
| 71 | +2. Remove unused packages by running the following: |
| 72 | + |
| 73 | +```shell |
| 74 | +npm uninstall react-app-rewired jest-tap-reporter |
| 75 | +``` |
| 76 | + |
| 77 | +3. Revert the scripts in package.json back to their original formats: |
| 78 | + |
| 79 | +```json |
| 80 | + "scripts": { |
| 81 | + "start": "react-scripts start", |
| 82 | + "build": "react-scripts build", |
| 83 | + "test": "react-scripts test" |
| 84 | + }, |
| 85 | +``` |
| 86 | + |
| 87 | +4. Remove the following lines from your `.gitignore` file. These should be enabled when publishing or sharing your application. |
| 88 | + |
| 89 | +```ms |
| 90 | +package-lock.json |
| 91 | +yarn.lock |
| 92 | +``` |
| 93 | + |
| 94 | +Happy hacking! |
0 commit comments