Skip to content

Commit 9e0e102

Browse files
committed
Merge branch 'dev-fe' into release-1.0.0
2 parents e4ab324 + 252c643 commit 9e0e102

File tree

144 files changed

+5090
-653
lines changed

Some content is hidden

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

144 files changed

+5090
-653
lines changed

โ€Ž.github/workflows/frontend-deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "frontend-docker-build"
33
on:
44
push:
55
branches: [ "dev-fe" ]
6-
6+
77
jobs:
88
build:
99
name: Build and Test
@@ -25,7 +25,7 @@ jobs:
2525
run: yarn install
2626

2727
- name: Build
28-
run: |
28+
run: |
2929
cd packages/frontend
3030
yarn build
3131
@@ -53,6 +53,8 @@ jobs:
5353
file: ./packages/frontend/Dockerfile
5454
push: true
5555
tags: ${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-frontend:0.1
56+
build-args: |
57+
NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }}
5658
5759
deploy:
5860
name: Deploy Frontend

โ€Žpackages/frontend/.eslintrc.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,19 @@
3131
],
3232
"react/require-default-props": "off",
3333
"@typescript-eslint/no-use-before-define": "off",
34-
"import/prefer-default-export": "off"
34+
"react/jsx-props-no-spreading": "off",
35+
"import/prefer-default-export": "off",
36+
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
3537
},
38+
"overrides": [
39+
{
40+
"files": [
41+
"**/__tests__/**/*.[jt]s?(x)",
42+
"**/?(*.)+(spec|test).[jt]s?(x)"
43+
],
44+
"extends": ["plugin:testing-library/react"]
45+
}
46+
],
3647
"settings": {
3748
"import/external-module-folders": [".yarn"]
3849
},

โ€Žpackages/frontend/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ npm-debug.log*
2525
yarn-debug.log*
2626
yarn-error.log*
2727

28-
# local env files
29-
.env*.local
28+
# env files
29+
.env*
3030

3131
# vercel
3232
.vercel

โ€Žpackages/frontend/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM node:18.17.1
22

3+
ARG NEXT_PUBLIC_BASE_URL
4+
ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
5+
36
WORKDIR /app
47

58
COPY . .

โ€Žpackages/frontend/jest.config.mjs

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1-
import nextJest from 'next/jest.js'
1+
import nextJest from "next/jest.js";
22

33
const createJestConfig = nextJest({
4-
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
5-
dir: './',
6-
})
4+
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
5+
dir: "./",
6+
});
77

8-
// Add any custom config to be passed to Jest
9-
/** @type {import('jest').Config} */
10-
const config = {
11-
// Add more setup options before each test is run
12-
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
8+
const customJestConfig = {
9+
testEnvironment: "jsdom",
10+
};
1311

14-
testEnvironment: 'jest-environment-jsdom',
15-
}
12+
export default async function config() {
13+
const styleFileRegex = "^.+\\.(css|sass|scss)$";
14+
const nextJestConfig = await createJestConfig(customJestConfig)();
15+
16+
const defaultMapper = nextJestConfig.moduleNameMapper[styleFileRegex]; // Next.js ๊ธฐ๋ณธ ์„ค์ • ์‚ญ์ œ
17+
delete nextJestConfig.moduleNameMapper[styleFileRegex];
1618

17-
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
18-
export default createJestConfig(config)
19+
return {
20+
...nextJestConfig,
21+
moduleNameMapper: {
22+
"design-system/styles/.+\\.css$": defaultMapper,
23+
...nextJestConfig.moduleNameMapper,
24+
},
25+
transform: {
26+
"\\.css\\.ts$": "@vanilla-extract/jest-transform", // Jest transform ์„ค์ •
27+
...nextJestConfig.transform,
28+
},
29+
};
30+
}

โ€Žpackages/frontend/next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const withVanillaExtract = createVanillaExtractPlugin();
55
/** @type {import('next').NextConfig} */
66
const nextConfig = {
77
reactStrictMode: false, // react-toastify toast ๋‘ ๋ฒˆ ๋ Œ๋”๋ง๋˜๋Š” ๋ฌธ์ œ
8+
pageExtensions: ["page.tsx", "page.ts", "page.jsx", "page.js"],
89
async rewrites() {
910
return [
1011
{

โ€Žpackages/frontend/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@storybook/react": "^7.5.3",
2222
"@vanilla-extract/css": "^1.14.0",
2323
"axios": "^1.6.2",
24+
"d3": "^7.8.5",
2425
"next": "14.0.2",
2526
"react": "^18",
2627
"react-dom": "^18",
@@ -36,14 +37,18 @@
3637
"@storybook/blocks": "^7.5.3",
3738
"@storybook/nextjs": "^7.5.3",
3839
"@storybook/testing-library": "^0.2.2",
40+
"@testing-library/dom": "^9.3.3",
3941
"@testing-library/jest-dom": "^6.1.4",
4042
"@testing-library/react": "^14.1.0",
43+
"@testing-library/user-event": "^14.5.1",
44+
"@types/d3": "^7",
4145
"@types/jest": "^29.5.8",
4246
"@types/node": "^20",
4347
"@types/react": "^18",
4448
"@types/react-dom": "^18",
4549
"@typescript-eslint/eslint-plugin": "^6.11.0",
4650
"@typescript-eslint/parser": "^6.11.0",
51+
"@vanilla-extract/jest-transform": "^1.1.1",
4752
"@vanilla-extract/next-plugin": "^2.3.2",
4853
"@vanilla-extract/webpack-plugin": "^2.3.1",
4954
"css-loader": "^6.8.1",
@@ -57,6 +62,7 @@
5762
"eslint-plugin-react": "^7.33.2",
5863
"eslint-plugin-react-hooks": "^4.6.0",
5964
"eslint-plugin-storybook": "^0.6.15",
65+
"eslint-plugin-testing-library": "^6.2.0",
6066
"jest": "^29.7.0",
6167
"jest-environment-jsdom": "^29.7.0",
6268
"lint-staged": "^15.1.0",
@@ -66,5 +72,8 @@
6672
"storybook": "^7.5.3",
6773
"typescript": "5.0.0-beta",
6874
"webpack": "^5.89.0"
75+
},
76+
"msw": {
77+
"workerDirectory": "public"
6978
}
7079
}

โ€Žpackages/frontend/public/dark-logo.svg

Lines changed: 12 additions & 12 deletions
Loading
-25.3 KB
Binary file not shown.
Loading
Loading
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<browserconfig>
3+
<msapplication>
4+
<tile>
5+
<square150x150logo src="/mstile-150x150.png"/>
6+
<TileColor>#da532c</TileColor>
7+
</tile>
8+
</msapplication>
9+
</browserconfig>
Loading
Loading
14.7 KB
Binary file not shown.
Loading
Loading
Loading
Loading
Loading
Lines changed: 20 additions & 0 deletions
Loading
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "",
3+
"short_name": "",
4+
"icons": [
5+
{
6+
"src": "/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/android-chrome-512x512.png",
12+
"sizes": "512x512",
13+
"type": "image/png"
14+
}
15+
],
16+
"theme_color": "#ffffff",
17+
"background_color": "#ffffff",
18+
"display": "standalone"
19+
}

โ€Žpackages/frontend/public/folder.svg

Lines changed: 9 additions & 0 deletions
Loading

โ€Žpackages/frontend/public/github.svg

Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
ย (0)