Skip to content

Commit 1f0128e

Browse files
Migration to Gatsby version 4 (#629)
* update to Gatsby v3 * update to Gatsby v4 * refreshing Gatsby database on dev env * update gatsby-source-filesystem * update all Gatsby plugins to latest versions * fixed GraphQL query for friends data * update axios and uuid * update styled components * remove unused Travis config * switch off warning childImageSharp * update React to v18 * update TypeScript to 4.7.4 * update React plugins * update Redux and its plugins * fix friends data from yaml source * move articles code to posts folder * remove unused cypress * moved frientd components to separate folder * introduce path aliases for core framework folders * organize imports for the codebase * move articles reducer to redux toolkit * move application logic to app folder * fix warnings with ordering css with mini-css-webpack-plugin * remove unused Redux connections * configure typescript jest for unit tests * jest testing * fix navigation among articles and tags * fix business areas in business page * fix tests and remove unused packages * update friends data source * merge with webview changes * move friends loader logic to one module * simplify friends domain dependencies * data loader for partners * fix business services page * move products subdomain models to module folder * fix tag links and article images
1 parent f0cfd69 commit 1f0128e

233 files changed

Lines changed: 39412 additions & 25544 deletions

File tree

Some content is hidden

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

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.cache
22
package.json
33
package-lock.json
4+
tsconfig.json
45
public

.prettierrc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,18 @@
44
"trailingComma": "es5",
55
"printWidth": 120,
66
"tabWidth": 2,
7-
"jsxBracketSameLine": true
7+
"jsxBracketSameLine": true,
8+
"importOrder": [
9+
"^(react|gatsby)(.*)$",
10+
"^(@(App|Domain|State|Templates)|(app|domain|pages|gatsby-templates))/(.*)$",
11+
"^(@(Layout|Components|Utils)|(layout|components|utils))/(.*)$",
12+
"(newsletter|posts|friends|search)/(.*)$",
13+
"^(./)",
14+
"^@Styles/(.*)$",
15+
"^@Assets/(.*)$"
16+
],
17+
"importOrderSeparation": true,
18+
"importOrderSortSpecifiers": true,
19+
"importOrderCaseInsensitive": false,
20+
"organizeImportsSkipDestructiveCodeActions": true
821
}

.travis.yml

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

.vscode/launch.json

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,64 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"type": "pwa-chrome",
9-
"request": "launch",
10-
"name": "Launch Chrome against localhost",
11-
"url": "http://localhost:8080",
12-
"webRoot": "${workspaceFolder}"
13-
}
14-
]
15-
}
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Gatsby develop",
9+
"type": "pwa-node",
10+
"request": "launch",
11+
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
12+
"windows": {
13+
"name": "Gatsby develop",
14+
"type": "pwa-node",
15+
"request": "launch",
16+
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
17+
},
18+
"args": ["develop"],
19+
"env": {
20+
"PARCEL_WORKERS": "0",
21+
"GATSBY_CPU_COUNT": "1"
22+
},
23+
"runtimeArgs": ["--nolazy"],
24+
"console": "integratedTerminal"
25+
//"cwd": "${workspaceRoot}/gatsby"
26+
},
27+
{
28+
"name": "Gatsby build",
29+
"type": "node",
30+
"request": "launch",
31+
"program": "${workspaceRoot}/node_modules/.bin/gatsby",
32+
"windows": {
33+
"name": "Gatsby build",
34+
"type": "node",
35+
"request": "launch",
36+
"program": "${workspaceRoot}/node_modules/gatsby/dist/bin/gatsby"
37+
},
38+
"args": ["build"],
39+
"env": {
40+
"PARCEL_WORKERS": "0",
41+
"GATSBY_CPU_COUNT": "1"
42+
},
43+
"runtimeArgs": ["--nolazy"],
44+
"console": "integratedTerminal"
45+
//"cwd": "${workspaceRoot}/gatsby"
46+
},
47+
{
48+
"type": "chrome",
49+
"request": "launch",
50+
"name": "Client side in Chrome",
51+
"url": "http://localhost:8000",
52+
"webRoot": "${workspaceFolder}/gatsby"
53+
},
54+
{
55+
"type": "node",
56+
"request": "launch",
57+
"name": "Jest All",
58+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
59+
"console": "integratedTerminal",
60+
"internalConsoleOptions": "neverOpen",
61+
"protocol": "inspector"
62+
}
63+
]
64+
}

README.md

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pola Web
22

3-
Celem tego projektu jest zbudowanie interfejsu Web w technologii React dla aplikacji [Pola. Zabierz ją na zakupy](https://www.pola-app.pl/). W tym celu ściślę współpracuje z [pola-backend](https://github.com/KlubJagiellonski/pola-backend).
3+
Celem tego projektu jest zbudowanie interfejsu Web w technologii React dla aplikacji [Pola. Zabierz ją na zakupy](https://www.pola-app.pl/). W tym celu ściśle współpracuje z [pola-backend](https://github.com/KlubJagiellonski/pola-backend).
44

55
Masz dość masówki globalnych koncernów? Szukasz lokalnych firm tworzących unikatowe produkty? Pola pomoże Ci odnaleźć polskie wyroby. Zabierając Polę na zakupy, odnajdujesz produkty „z duszą” i wspierasz polską gospodarkę.
66

@@ -10,6 +10,20 @@ Ten projekt został rozpoczęty wykorzystując starter [https://evaluates2.githu
1010

1111
Podgląd wersji deweloperskiej: [https://pola-staging.herokuapp.com/](https://pola-staging.herokuapp.com/)
1212

13+
# Packages
14+
15+
We actually use Gatsby version 4 what requires usage of Gatsby plugins in proper versions too
16+
17+
Migration:
18+
https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/
19+
https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v3-to-v4/
20+
21+
to check obsolate packages (in particular Gatsby plugins)
22+
23+
```
24+
npm outdated
25+
```
26+
1327
## Dostępne skrypty
1428

1529
W katalogu projektu możesz uruchomić:
@@ -22,7 +36,9 @@ Odtwórz [http://localhost:8000](http://localhost:8000) aby wyświetlić go w pr
2236
Strona zostanie załadowana ponownie, jeśli wprowadzisz zmiany.
2337
W konsoli zostaną również wyświetlone wszelkie błędy analizy statycznej (ang. lint).
2438

25-
### `npm test`
39+
Otwórz [http://localhost:8000/\_\_\_graphql](http://localhost:8000/___graphql) aby testować bazę danych aplikacji (artykuły, grafiki, faq)
40+
41+
### `npm run test`
2642

2743
Uruchamia test runner w interaktywnym trybie obserwującym zmiany.
2844

@@ -31,48 +47,19 @@ Uruchamia test runner w interaktywnym trybie obserwującym zmiany.
3147
Kompiluje aplikację do produkcji do folderu `build`.
3248
Prawidłowo buduje aplikacje Reacta w trybie produkcyjnym i optymalizuje ją pod kątem najlepszej wydajności.
3349

34-
```
35-
npm run build
36-
```
37-
38-
Serve local build
39-
40-
```
41-
npm run serve
42-
```
43-
44-
Run Unit Tests (TDD watch-mode style)
45-
46-
```
47-
npm test
48-
```
49-
50-
Run Unit Tests (Single run for CI and with code coverage output)
51-
52-
```
53-
npm run test-once
54-
```
55-
56-
Run BDD / E2e Tests (Locally With UI)
57-
58-
```
59-
npm run e2e
60-
```
61-
62-
Run BDD / E2e Tests (Headless Mode for CI):
63-
64-
```
65-
node_modules/.bin/cypress run
66-
```
67-
6850
Run linting (calls both prettier linting and tslint)
6951

7052
```
7153
npm run lint
7254
```
7355

74-
Deploy
56+
# Deploy
57+
58+
Deployments go through Github actions process and Github pages. All pushes to **prod** branch are automatically deployed. Pola API is hosted on Heroku cloud infrastructure.
7559

7660
```
77-
npx gatsby deploy
61+
git checkout prod
62+
git merge master
63+
git commit -m "merge master to production ver. X.Y.Z"
64+
git push
7865
```

content/friends/friends.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
- slug: radziemska
2+
name: Radziemska
3+
description: Rodzime przedsiębiorstwo chemiczne powstałe w 1982 roku. Firma specjalizuje się w produkcji chemii gospodarczej, w tym odplamiaczy, proszków do prania czy wybielaczy. Jest laureatem wielu nagród konsumenckich, a jej siedziba znajduje się w Łomiankach pod Warszawą.
4+
image: logos/logo_radziemska.jpg
5+
page: https://www.radziemska.pl/
6+
- slug: woda-staropolska
7+
name: Woda Staropolska
8+
description: Polski producent wody mineralnej pochodzący z Iłży. Jest to firma rodzinna o ponad 30-letniej tradycji, która specjalizuje się w produkcji bogatych w magnez i wapń wód mineralnych pod marką „Staropolska”. Od 1986 r. przedsiębiorstwo realizuje swoją misję, stając się w ostatnim czasie liderem wśród producentów i dostawców butelkowanej wody mineralnej przeznaczonej dla firm.
9+
image: logos/staropolska-logo.png
10+
page: https://wodadlafirmy.pl/
11+
- slug: italian-fashion
12+
name: Italian Fashion
13+
description: Firma Italian Fashion istnieje na rynku polskim od 1990 roku. Zatrudnia około 300 pracowników. Od początku istnienia zajmuje się produkcją bielizny damskiej, męskiej i dziecięcej oraz wygodnej odzieży domowej i akcesoriów, takich jak skarpety. W ofercie firmy znaleźć można również kolekcje dedykowane dla kobiet w ciąży i mam karmiących, jak również piżamy i koszule nocne dla kobiet puszystych.”
14+
image: logos/italian-fashion.jpg
15+
page: https://www.italianfashion.pl/
16+
- slug: avetpharma
17+
name: AvetPharma
18+
description: Spółka farmaceutyczna założona 10 lat temu przez magistra farmacji z wieloletnim doświadczeniem w branży leków OTC oraz suplementów diety. Firma zajmuje się produkcją oraz dystrybucją suplementów diety. Przez dekadę wprowadziła na rynek ponad 40 produktów własnych, które są dostępne w aptekach, sklepach zielarsko-medycznych oraz marketach. Siedziba spółki znajduje się w Warszawie.
19+
image: logos/AvetPharma.png
20+
page: https://avetpharma.pl/
21+
- slug: ameripol-trading
22+
name: AmeriPol Trading
23+
description: Firma Ameri-Pol Trading Ltd sp. z o.o. jest polską firmą założoną w 1992 r. jako spółka polsko amerykańska, jednak w ciągu lat działalności udziałowiec amerykański został wykupiony przez polskich udziałowców. Firma oferuje szeroki wybór klejów kontaktowych w pojemnikach ciśnieniowych oraz rozpuszczalników mających zastosowanie w różnych branżach, m.in. w meblarstwie, w branży motoryzacyjnej, w produkcji jachtów, w branży budowlanej. Oferowane przez nas kleje są sprzedawane pod własną wspólną marką SPRAY-KON i LEP-KON.
24+
image: logos/AmeriPol-Trading.png
25+
page: https://spraykon.pl/
26+
- slug: pluton-kawa
27+
name: Pluton Kawa
28+
description: Historia firmy sięga XIX wieku. Jej założycielem był Tadeusz Tarasiewicz, który założył pierwszą na ziemiach polskich palarnię kawy, pod nazywą Pluton. Firma przetrwała do 1950 r. W 2017 r. została reaktywowana. Pluton Kawa kultywuje tradycje i z powodzeniem stosuje współcześnie wartości kupieckie XX-lecia międzywojennego.
29+
image: logos/logo_pluton.png
30+
page: https://kawapluton.com/
31+
- slug: naturalne-zdrowie-barbara-bucko
32+
name: Naturalne Zdrowie Barbara Bućko
33+
description: Firma rodzinna, producent zdrowej żywności prowadzący również sklep internetowy. Firma w swoim asortymencie posiada produkty naturalne i nieprzetworzone. Stawia na dostawy bezpośrednio od polskich rolników i współpracę ze sprawdzonymi i zaufanymi dostawcami.
34+
image: logos/logo_bucko.png
35+
page: https://naturalniezdrowe.pl/
File renamed without changes.

0 commit comments

Comments
 (0)