Skip to content

Commit

Permalink
Chore: 공통 패키지 이동 및 수정
Browse files Browse the repository at this point in the history
- react-scripts 제거
- 공통된 패키지 root로 이동
- package.json 수정
- .gitignore 수정

Related to #26
  • Loading branch information
Zamoca42 committed Feb 15, 2024
1 parent 8ac7771 commit d1b989c
Show file tree
Hide file tree
Showing 10 changed files with 6,129 additions and 15,602 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,8 @@ $RECYCLE.BIN/
# Backend Ignore

backend/static
backend/generated
backend/generated

# Frontend Ignore

build
11 changes: 2 additions & 9 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"build": "nest build",
Expand Down Expand Up @@ -44,31 +43,25 @@
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz"
},
"devDependencies": {
"@types/jest": "^29.5.2",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@types/cookie-parser": "^1.4.6",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/multer": "^1.4.11",
"@types/node": "^20.3.1",
"@types/passport-jwt": "^4.0.0",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"prisma": "^5.9.1",
"source-map-support": "^0.5.21",
"supabase": "^1.131.5",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.3"
"tsconfig-paths": "^4.2.0"
},
"jest": {
"moduleFileExtensions": [
Expand Down
23 changes: 0 additions & 23 deletions frontend/.gitignore

This file was deleted.

7 changes: 4 additions & 3 deletions frontend/public/index.html → frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<!-- <link rel="icon" href="/favicon.ico" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="yes" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" href="touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="167x167" href="touch-icon-ipad-retina.png">
Expand All @@ -20,6 +20,7 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>

</html>
45 changes: 16 additions & 29 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
{
"name": "frontend",
"version": "0.1.0",
"type": "module",
"proxy": "https://api.doit-toeic.xyz",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.45",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.34",
"axios": "^1.6.5",
"browserslist-to-esbuild": "^2.1.1",
"framer-motion": "^10.17.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.49.2",
"react-icons": "^4.12.0",
"react-responsive": "^9.0.2",
"react-router-dom": "^6.21.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"react-spinners": "^0.13.8",
"styled-components": "^6.1.6",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4",
"workbox-background-sync": "^6.6.0",
"workbox-broadcast-update": "^6.6.0",
Expand All @@ -40,12 +30,10 @@
"workbox-streams": "^6.6.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint src",
"tsc": "tsc"
"start": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"lint": "eslint src"
},
"eslintConfig": {
"extends": [
Expand All @@ -66,15 +54,14 @@
]
},
"devDependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/react-responsive": "^8.0.8",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.4"
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.34",
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.1.2",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.1"
}
}
1 change: 1 addition & 0 deletions frontend/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
26 changes: 22 additions & 4 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
{
// "compilerOptions": {
// "target": "es5",
// "lib": ["dom", "dom.iterable", "esnext"],
// "allowJs": true,
// "skipLibCheck": true,
// "esModuleInterop": true,
// "allowSyntheticDefaultImports": true,
// "strict": true,
// "forceConsistentCasingInFileNames": true,
// "noFallthroughCasesInSwitch": true,
// "module": "esnext",
// "moduleResolution": "node",
// "resolveJsonModule": true,
// "isolatedModules": true,
// "noEmit": true,
// "jsx": "react-jsx",
// "typeRoots": ["./src/types", "./node_modules/@types"],
// },
"compilerOptions": {
"target": "es5",
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"types": ["vite/client", "vite-plugin-svgr/client"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"typeRoots": ["./src/types", "./node_modules/@types"],
"jsx": "react-jsx"
},
"include": ["src"],
"exclude": ["**/*.test.ts", "**/*.test.tsx"],
Expand Down
19 changes: 19 additions & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import svgrPlugin from 'vite-plugin-svgr';
import browserslistToEsbuild from 'browserslist-to-esbuild';
import path from 'path';

export default defineConfig({
plugins: [react(), viteTsconfigPaths(), svgrPlugin()],
build: {
outDir: 'build',
target: browserslistToEsbuild(['>0.2%', 'not dead', 'not op_mini all']),
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});
Loading

0 comments on commit d1b989c

Please sign in to comment.