|
1 | 1 | ## Commit Zero |
2 | 2 |
|
3 | | -This app is created to work with Commit Zero. You'll need to run the `stack` application against a `config.yaml` file to generate the code. |
| 3 | +This app is created to work with Commit Zero. You'll need to run the `zero` application against a `zero.yml` file to generate the code. |
4 | 4 |
|
5 | | -### Stack Command |
| 5 | +### Zero Command |
6 | 6 |
|
7 | 7 | ```bash |
8 | | -stack -config <config file> <source directory> <destination directory> |
| 8 | +zero -config <config file> <source directory> <destination directory> |
9 | 9 | ``` |
10 | 10 |
|
11 | 11 | #### Config File |
@@ -37,73 +37,62 @@ _Once you've templated this out, you can remove the above section from this READ |
37 | 37 |
|
38 | 38 | # <% .Name %> |
39 | 39 |
|
40 | | -## React App |
| 40 | +## Create React App |
41 | 41 |
|
42 | 42 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
43 | 43 |
|
44 | | -## Available Scripts |
| 44 | +See full documentation [here](docs/create-react-app.md) |
45 | 45 |
|
46 | | -In the project directory, you can run: |
| 46 | +### Commands |
47 | 47 |
|
48 | | -### `yarn start` |
| 48 | +#### Install Dependencies |
49 | 49 |
|
50 | | -Runs the app in the development mode.<br /> |
51 | | -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
52 | | - |
53 | | -The page will reload if you make edits.<br /> |
54 | | -You will also see any lint errors in the console. |
55 | | - |
56 | | -### `yarn test` |
57 | | - |
58 | | -Launches the test runner in the interactive watch mode.<br /> |
59 | | -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. |
60 | | - |
61 | | -### `yarn build` |
62 | | - |
63 | | -Builds the app for production to the `build` folder.<br /> |
64 | | -It correctly bundles React in production mode and optimizes the build for the best performance. |
65 | | - |
66 | | -The build is minified and the filenames include the hashes.<br /> |
67 | | -Your app is ready to be deployed! |
68 | | - |
69 | | -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
70 | | - |
71 | | -### `yarn eject` |
72 | | - |
73 | | -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** |
| 50 | +```zsh |
| 51 | +yarn |
| 52 | +``` |
74 | 53 |
|
75 | | -If 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. |
| 54 | +#### Run locally |
76 | 55 |
|
77 | | -Instead, 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. |
| 56 | +```zsh |
| 57 | +yarn start |
| 58 | +``` |
78 | 59 |
|
79 | | -You 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. |
| 60 | +#### Run Tests |
80 | 61 |
|
81 | | -## Learn More |
| 62 | +```zsh |
| 63 | +yarn test |
| 64 | +``` |
82 | 65 |
|
83 | | -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). |
| 66 | +## Backend App |
84 | 67 |
|
85 | | -To learn React, check out the [React documentation](https://reactjs.org/). |
| 68 | +To run the backend app locally all you need to do is build the container and run it alongside your app. |
86 | 69 |
|
87 | | -### Code Splitting |
| 70 | +### Backend Repo |
88 | 71 |
|
89 | | -This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting |
| 72 | +The corresponding backend for this app is [zero-deployable-backend](https://github.com/commitdev/zero-deployable-backend) |
90 | 73 |
|
91 | | -### Analyzing the Bundle Size |
| 74 | +```zsh |
| 75 | +git clone [email protected]:commitdev/zero-deployable-backend.git |
| 76 | +``` |
92 | 77 |
|
93 | | -This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size |
| 78 | +### Docker |
94 | 79 |
|
95 | | -### Making a Progressive Web App |
| 80 | +Build the docker image locally and run it. We need to set a Pod name so that the frontend can display that data. |
96 | 81 |
|
97 | | -This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app |
| 82 | +```zsh |
| 83 | +docker build . -t zero-deployable-backend |
98 | 84 |
|
99 | | -### Advanced Configuration |
| 85 | +docker run -p 8080:8080 -e SERVER_PORT=8080 -e POD_NAME="Fake POD name." zero-deployable-backend |
| 86 | +``` |
100 | 87 |
|
101 | | -This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration |
| 88 | +### Environment Configs |
102 | 89 |
|
103 | | -### Deployment |
| 90 | +These are set by `REACT_APP_CONFIG` enviroment variable at build time. This corresponds to a json file in the config directory. |
104 | 91 |
|
105 | | -This section has moved here: https://facebook.github.io/create-react-app/docs/deployment |
| 92 | +For example to build the staging site and host it you would use: |
106 | 93 |
|
107 | | -### `yarn build` fails to minify |
| 94 | +```zsh |
| 95 | +REACT_APP_CONFIG=staging yarn build |
108 | 96 |
|
109 | | -This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify |
| 97 | +serve -s build |
| 98 | +``` |
0 commit comments