Skip to content

Commit 6a197d8

Browse files
authored
Merge pull request #9 from commitdev/reorganize-for-zero
Reorganized frontend for the new zero project.
2 parents e1d2dea + 945d6a5 commit 6a197d8

33 files changed

Lines changed: 331 additions & 152 deletions

.gitignore

Lines changed: 0 additions & 29 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
run:
3+
@echo Done

README.md

Lines changed: 5 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,9 @@
1-
## Commit Zero
1+
# Zero Deployable Frontend
22

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-
5-
### Zero Command
6-
7-
```bash
8-
zero -config <config file> <source directory> <destination directory>
9-
```
10-
11-
#### Config File
12-
13-
See `example.yml` for the full example.
14-
15-
```yaml
16-
---
17-
name: example-commit-zero-frontend
18-
19-
# params are key value pairs passed into templates
20-
params:
21-
22-
# Application config
23-
24-
# production host name
25-
productionHost: fe-test.commitzero.com
26-
productionBucket: fe-test.commitzero.com
27-
28-
# staging host name
29-
stagingHost: fe-test.commitzero.com
30-
stagingBucket: fe-test.commitzero.com
31-
32-
```
33-
34-
_Once you've templated this out, you can remove the above section from this README as it's no longer needed._
35-
36-
---
37-
38-
# <% .Name %>
39-
40-
## Create React App
41-
42-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
43-
44-
See full documentation [here](docs/create-react-app.md)
45-
46-
### Commands
47-
48-
#### Install Dependencies
49-
50-
```zsh
51-
yarn
52-
```
53-
54-
#### Run locally
55-
56-
```zsh
57-
yarn start
58-
```
59-
60-
#### Run Tests
61-
62-
```zsh
63-
yarn test
64-
```
65-
66-
## Backend App
67-
68-
To run the backend app locally all you need to do is build the container and run it alongside your app.
3+
This is a [zero](https://github.com/commitdev/zero) module which sets up a
4+
service which can be deployed to the environment set up with [zero-aws-eks-stack](https://github.com/commitdev/zero-aws-eks-stack).
5+
It also contains a simple CircleCI pipeline which defines how to build and deploy the assets.
696

707
### Backend Repo
718

72-
The corresponding backend for this app is [zero-deployable-backend](https://github.com/commitdev/zero-deployable-backend)
73-
74-
```zsh
75-
git clone git@github.com:commitdev/zero-deployable-backend.git
76-
```
77-
78-
### Docker
79-
80-
Build the docker image locally and run it. We need to set a Pod name so that the frontend can display that data.
81-
82-
```zsh
83-
docker build . -t zero-deployable-backend
84-
85-
docker run -p 8080:8080 -e SERVER_PORT=8080 -e POD_NAME="Fake POD name." zero-deployable-backend
86-
```
87-
88-
### Environment Configs
89-
90-
These are set by `REACT_APP_CONFIG` enviroment variable at build time. This corresponds to a json file in the config directory.
91-
92-
For example to build the staging site and host it you would use:
93-
94-
```zsh
95-
REACT_APP_CONFIG=staging yarn build
96-
97-
serve -s build
98-
```
9+
The corresponding backend for this app is [zero-deployable-backend](https://github.com/commitdev/zero-deployable-backend).

commit0.module.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

example.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

templates/.gitignore

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
# Created by https://www.gitignore.io/api/linux,macos,windows,node
2+
# Edit at https://www.gitignore.io/?templates=linux,macos,windows,node
3+
4+
### Linux ###
5+
*~
6+
7+
# temporary files which can be created if a process still has a handle open of a deleted file
8+
.fuse_hidden*
9+
10+
# KDE directory preferences
11+
.directory
12+
13+
# Linux trash folder which might appear on any partition or disk
14+
.Trash-*
15+
16+
# .nfs files are created when an open file is removed but is still being accessed
17+
.nfs*
18+
19+
### macOS ###
20+
# General
21+
.DS_Store
22+
.AppleDouble
23+
.LSOverride
24+
25+
# Icon must end with two \r
26+
Icon
27+
28+
# Thumbnails
29+
._*
30+
31+
# Files that might appear in the root of a volume
32+
.DocumentRevisions-V100
33+
.fseventsd
34+
.Spotlight-V100
35+
.TemporaryItems
36+
.Trashes
37+
.VolumeIcon.icns
38+
.com.apple.timemachine.donotpresent
39+
40+
# Directories potentially created on remote AFP share
41+
.AppleDB
42+
.AppleDesktop
43+
Network Trash Folder
44+
Temporary Items
45+
.apdisk
46+
47+
### Node ###
48+
# Logs
49+
logs
50+
*.log
51+
npm-debug.log*
52+
yarn-debug.log*
53+
yarn-error.log*
54+
lerna-debug.log*
55+
56+
# Diagnostic reports (https://nodejs.org/api/report.html)
57+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
58+
59+
# Runtime data
60+
pids
61+
*.pid
62+
*.seed
63+
*.pid.lock
64+
65+
# Directory for instrumented libs generated by jscoverage/JSCover
66+
lib-cov
67+
68+
# Coverage directory used by tools like istanbul
69+
coverage
70+
*.lcov
71+
72+
# nyc test coverage
73+
.nyc_output
74+
75+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
76+
.grunt
77+
78+
# Bower dependency directory (https://bower.io/)
79+
bower_components
80+
81+
# node-waf configuration
82+
.lock-wscript
83+
84+
# Compiled binary addons (https://nodejs.org/api/addons.html)
85+
build/Release
86+
87+
# Dependency directories
88+
node_modules/
89+
jspm_packages/
90+
91+
# TypeScript v1 declaration files
92+
typings/
93+
94+
# TypeScript cache
95+
*.tsbuildinfo
96+
97+
# Optional npm cache directory
98+
.npm
99+
100+
# Optional eslint cache
101+
.eslintcache
102+
103+
# Optional REPL history
104+
.node_repl_history
105+
106+
# Output of 'npm pack'
107+
*.tgz
108+
109+
# Yarn Integrity file
110+
.yarn-integrity
111+
112+
# dotenv environment variables file
113+
.env
114+
.env.test
115+
116+
# parcel-bundler cache (https://parceljs.org/)
117+
.cache
118+
119+
# next.js build output
120+
.next
121+
122+
# nuxt.js build output
123+
.nuxt
124+
125+
# rollup.js default build output
126+
dist/
127+
128+
# Uncomment the public line if your project uses Gatsby
129+
# https://nextjs.org/blog/next-9-1#public-directory-support
130+
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
131+
# public
132+
133+
# Storybook build outputs
134+
.out
135+
.storybook-out
136+
137+
# vuepress build output
138+
.vuepress/dist
139+
140+
# Serverless directories
141+
.serverless/
142+
143+
# FuseBox cache
144+
.fusebox/
145+
146+
# DynamoDB Local files
147+
.dynamodb/
148+
149+
# Temporary folders
150+
tmp/
151+
temp/
152+
153+
### Windows ###
154+
# Windows thumbnail cache files
155+
Thumbs.db
156+
Thumbs.db:encryptable
157+
ehthumbs.db
158+
ehthumbs_vista.db
159+
160+
# Dump file
161+
*.stackdump
162+
163+
# Folder config file
164+
[Dd]esktop.ini
165+
166+
# Recycle Bin used on file shares
167+
$RECYCLE.BIN/
168+
169+
# Windows Installer files
170+
*.cab
171+
*.msi
172+
*.msix
173+
*.msm
174+
*.msp
175+
176+
# Windows shortcuts
177+
*.lnk
178+
179+
# End of https://www.gitignore.io/api/linux,macos,windows,node
180+
181+
# CircleCI
182+
.circleci/config-compiled.yml
183+
184+
# dependencies
185+
/.pnp
186+
.pnp.js
187+
188+
# testing
189+
/coverage
190+
191+
# production
192+
/build

0 commit comments

Comments
 (0)