Skip to content

Commit 26f5056

Browse files
Initial commit
1 parent 6f61dac commit 26f5056

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+10039
-0
lines changed

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": "eslint:recommended",
7+
"parserOptions": {
8+
"ecmaVersion": 12
9+
},
10+
"rules": {
11+
"indent": [
12+
"warning",
13+
4
14+
],
15+
"linebreak-style": [
16+
"error",
17+
"unix"
18+
],
19+
"quotes": [
20+
"error",
21+
"double"
22+
],
23+
"semi": [
24+
"error",
25+
"always"
26+
]
27+
}
28+
}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# IDE metadata
2+
.idea/
3+
.vscode/
4+
5+
# Client
6+
node_modules/
7+
public/dist/
8+
public/index.html
9+
cypress/videos/

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
build:
2+
@npx gulp build
3+
4+
test: run
5+
@npx cypress run
6+
7+
dev: run-server
8+
@npx gulp
9+
10+
run: build run-server
11+
12+
run-client:
13+
@npx gulp
14+
15+
run-server:
16+
@docker-compose up -d --build
17+
18+
destroy:
19+
@docker-compose down --rmi local --volumes
20+
21+
clean:
22+
rm -rf public/index.html public/dist/*

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# json formatter live
2+
json formatter live / Keyboard first, privacy-friendly, [installable](https://support.google.com/chrome/answer/9658361?co=GENIE.Platform%3DDesktop&hl=en) JSON formatter
3+
4+
[![Netlify Status](https://api.netlify.com/api/v1/badges/dec0f7d7-666e-4b01-ab1e-b282a52ab6d5/deploy-status)](https://app.netlify.com/sites/jfl/deploys)
5+
6+
### Run the project locally
7+
- Builds the project and starts a Docker container with nginx on port 8001
8+
```bash
9+
make run
10+
```
11+
12+
### Run the project for development
13+
- Starts Docker container and watches for file changes
14+
```bash
15+
make dev
16+
```
17+
18+
### Run the end to end test suite
19+
- Starts Docker container and runs the cypress end to end tests
20+
```bash
21+
make test
22+
```

cypress.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"video": false
3+
}

cypress/fixtures/example.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "hello@cypress.io",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}

cypress/fixtures/profile.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": 8739,
3+
"name": "Jane",
4+
"email": "jane@example.com"
5+
}

cypress/fixtures/users.json

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
[
2+
{
3+
"id": 1,
4+
"name": "Leanne Graham",
5+
"username": "Bret",
6+
"email": "Sincere@april.biz",
7+
"address": {
8+
"street": "Kulas Light",
9+
"suite": "Apt. 556",
10+
"city": "Gwenborough",
11+
"zipcode": "92998-3874",
12+
"geo": {
13+
"lat": "-37.3159",
14+
"lng": "81.1496"
15+
}
16+
},
17+
"phone": "1-770-736-8031 x56442",
18+
"website": "hildegard.org",
19+
"company": {
20+
"name": "Romaguera-Crona",
21+
"catchPhrase": "Multi-layered client-server neural-net",
22+
"bs": "harness real-time e-markets"
23+
}
24+
},
25+
{
26+
"id": 2,
27+
"name": "Ervin Howell",
28+
"username": "Antonette",
29+
"email": "Shanna@melissa.tv",
30+
"address": {
31+
"street": "Victor Plains",
32+
"suite": "Suite 879",
33+
"city": "Wisokyburgh",
34+
"zipcode": "90566-7771",
35+
"geo": {
36+
"lat": "-43.9509",
37+
"lng": "-34.4618"
38+
}
39+
},
40+
"phone": "010-692-6593 x09125",
41+
"website": "anastasia.net",
42+
"company": {
43+
"name": "Deckow-Crist",
44+
"catchPhrase": "Proactive didactic contingency",
45+
"bs": "synergize scalable supply-chains"
46+
}
47+
},
48+
{
49+
"id": 3,
50+
"name": "Clementine Bauch",
51+
"username": "Samantha",
52+
"email": "Nathan@yesenia.net",
53+
"address": {
54+
"street": "Douglas Extension",
55+
"suite": "Suite 847",
56+
"city": "McKenziehaven",
57+
"zipcode": "59590-4157",
58+
"geo": {
59+
"lat": "-68.6102",
60+
"lng": "-47.0653"
61+
}
62+
},
63+
"phone": "1-463-123-4447",
64+
"website": "ramiro.info",
65+
"company": {
66+
"name": "Romaguera-Jacobson",
67+
"catchPhrase": "Face to face bifurcated interface",
68+
"bs": "e-enable strategic applications"
69+
}
70+
},
71+
{
72+
"id": 4,
73+
"name": "Patricia Lebsack",
74+
"username": "Karianne",
75+
"email": "Julianne.OConner@kory.org",
76+
"address": {
77+
"street": "Hoeger Mall",
78+
"suite": "Apt. 692",
79+
"city": "South Elvis",
80+
"zipcode": "53919-4257",
81+
"geo": {
82+
"lat": "29.4572",
83+
"lng": "-164.2990"
84+
}
85+
},
86+
"phone": "493-170-9623 x156",
87+
"website": "kale.biz",
88+
"company": {
89+
"name": "Robel-Corkery",
90+
"catchPhrase": "Multi-tiered zero tolerance productivity",
91+
"bs": "transition cutting-edge web services"
92+
}
93+
},
94+
{
95+
"id": 5,
96+
"name": "Chelsey Dietrich",
97+
"username": "Kamren",
98+
"email": "Lucio_Hettinger@annie.ca",
99+
"address": {
100+
"street": "Skiles Walks",
101+
"suite": "Suite 351",
102+
"city": "Roscoeview",
103+
"zipcode": "33263",
104+
"geo": {
105+
"lat": "-31.8129",
106+
"lng": "62.5342"
107+
}
108+
},
109+
"phone": "(254)954-1289",
110+
"website": "demarco.info",
111+
"company": {
112+
"name": "Keebler LLC",
113+
"catchPhrase": "User-centric fault-tolerant solution",
114+
"bs": "revolutionize end-to-end systems"
115+
}
116+
},
117+
{
118+
"id": 6,
119+
"name": "Mrs. Dennis Schulist",
120+
"username": "Leopoldo_Corkery",
121+
"email": "Karley_Dach@jasper.info",
122+
"address": {
123+
"street": "Norberto Crossing",
124+
"suite": "Apt. 950",
125+
"city": "South Christy",
126+
"zipcode": "23505-1337",
127+
"geo": {
128+
"lat": "-71.4197",
129+
"lng": "71.7478"
130+
}
131+
},
132+
"phone": "1-477-935-8478 x6430",
133+
"website": "ola.org",
134+
"company": {
135+
"name": "Considine-Lockman",
136+
"catchPhrase": "Synchronised bottom-line interface",
137+
"bs": "e-enable innovative applications"
138+
}
139+
},
140+
{
141+
"id": 7,
142+
"name": "Kurtis Weissnat",
143+
"username": "Elwyn.Skiles",
144+
"email": "Telly.Hoeger@billy.biz",
145+
"address": {
146+
"street": "Rex Trail",
147+
"suite": "Suite 280",
148+
"city": "Howemouth",
149+
"zipcode": "58804-1099",
150+
"geo": {
151+
"lat": "24.8918",
152+
"lng": "21.8984"
153+
}
154+
},
155+
"phone": "210.067.6132",
156+
"website": "elvis.io",
157+
"company": {
158+
"name": "Johns Group",
159+
"catchPhrase": "Configurable multimedia task-force",
160+
"bs": "generate enterprise e-tailers"
161+
}
162+
},
163+
{
164+
"id": 8,
165+
"name": "Nicholas Runolfsdottir V",
166+
"username": "Maxime_Nienow",
167+
"email": "Sherwood@rosamond.me",
168+
"address": {
169+
"street": "Ellsworth Summit",
170+
"suite": "Suite 729",
171+
"city": "Aliyaview",
172+
"zipcode": "45169",
173+
"geo": {
174+
"lat": "-14.3990",
175+
"lng": "-120.7677"
176+
}
177+
},
178+
"phone": "586.493.6943 x140",
179+
"website": "jacynthe.com",
180+
"company": {
181+
"name": "Abernathy Group",
182+
"catchPhrase": "Implemented secondary concept",
183+
"bs": "e-enable extensible e-tailers"
184+
}
185+
},
186+
{
187+
"id": 9,
188+
"name": "Glenna Reichert",
189+
"username": "Delphine",
190+
"email": "Chaim_McDermott@dana.io",
191+
"address": {
192+
"street": "Dayna Park",
193+
"suite": "Suite 449",
194+
"city": "Bartholomebury",
195+
"zipcode": "76495-3109",
196+
"geo": {
197+
"lat": "24.6463",
198+
"lng": "-168.8889"
199+
}
200+
},
201+
"phone": "(775)976-6794 x41206",
202+
"website": "conrad.com",
203+
"company": {
204+
"name": "Yost and Sons",
205+
"catchPhrase": "Switchable contextually-based project",
206+
"bs": "aggregate real-time technologies"
207+
}
208+
},
209+
{
210+
"id": 10,
211+
"name": "Clementina DuBuque",
212+
"username": "Moriah.Stanton",
213+
"email": "Rey.Padberg@karina.biz",
214+
"address": {
215+
"street": "Kattie Turnpike",
216+
"suite": "Suite 198",
217+
"city": "Lebsackbury",
218+
"zipcode": "31428-2261",
219+
"geo": {
220+
"lat": "-38.2386",
221+
"lng": "57.2232"
222+
}
223+
},
224+
"phone": "024-648-3804",
225+
"website": "ambrose.net",
226+
"company": {
227+
"name": "Hoeger LLC",
228+
"catchPhrase": "Centralized empowering task-force",
229+
"bs": "target end-to-end models"
230+
}
231+
}
232+
]

cypress/integration/about.spec.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* eslint-disable no-undef */
2+
/// <reference types="cypress" />
3+
4+
context("About", () => {
5+
6+
beforeEach(() => {
7+
cy.visit("http://localhost:8001");
8+
});
9+
10+
it("Opens About modal", () => {
11+
12+
cy.get(".about")
13+
.should("be.visible")
14+
.click();
15+
16+
cy.get(".about-modal")
17+
.should("be.visible")
18+
.and("contain", "About");
19+
});
20+
});

0 commit comments

Comments
 (0)