From 4c0fa160b2fb8e8dfcb65f7e9a8b9ba028eff572 Mon Sep 17 00:00:00 2001 From: bicochan Date: Wed, 26 Feb 2025 11:36:55 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EB=B0=8F=20=EC=8B=A4=ED=96=89=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ pnpm-lock.yaml | 31 --------------------- 2 files changed, 73 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index bb8a34371..9281439ba 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,79 @@ ┗ ⛔️turbo.json ``` +## 새로운 프로젝트 설치 및 실행 + +### 1. 프로젝트 생성(Next.js) + +```bash +npx create-next-app@latest ./apps/as --typescript --eslint --tailwind --app +``` + +### 2. package.json 수정 + +```json +{ + // 기타 설정 ... + "dependencies": { + "@common/components": "workspace:*", // 추가 + "react": "^19.0.0", // 제거 + "react-dom": "^19.0.0", // 제거 + }, + "devDependencies": { + "@types/react": "^19", // 제거 + "@types/react-dom": "^19" // 제거 + } +} +``` + +### 3. tsconfig.json 수정 + +```json +{ + // 기타 설정 ... + "paths": { + "@common/components": ["../../packages/common/components/src"], // 추가 + "@common/assets/*": ["../../packages/common/assets/dist/*"], // 추가 + "@common/assets": ["../../packages/common/assets/dist"] // 추가 + } +} +``` + +### 4. tailwind.config.ts 수정 + +```ts +import type { Config } from "tailwindcss"; +import presetConfig from "../../tailwind.config.preset"; + +export default { + presets: [presetConfig], + darkMode: ["class", "[data-mode='dark']"], + content: [ + "../../packages/common/components/src/ui/**/*.{js,ts,jsx,tsx,mdx}", + // 기타 컨텐츠 ... + ], +} satisfies Config; +``` + +### 5. globals.css(또는 전역 css) 수정 + +```css +@import "@common/assets/index.css"; + +@tailwind base; +@tailwind components; +@tailwind utilities; + +/* 기타 스타일 */ +``` + +### 6. 패키지 의존성 재설치 + +```bash +rm -rf node_modules pnpm-lock.yaml +pnpm install +``` + ## 기술 스택 - React(^18) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3515e34fe..9f2702163 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,37 +25,6 @@ importers: specifier: 2.4.2 version: 2.4.2 - apps/as: - dependencies: - '@common/components': - specifier: workspace:* - version: link:../../packages/common/components - next: - specifier: 15.1.7 - version: 15.1.7(react-dom@18.3.1)(react@18.3.1) - devDependencies: - '@eslint/eslintrc': - specifier: ^3 - version: 3.3.0 - '@types/node': - specifier: ^20 - version: 20.17.19 - eslint: - specifier: ^9 - version: 9.21.0 - eslint-config-next: - specifier: 15.1.7 - version: 15.1.7(eslint@9.21.0)(typescript@5.6.3) - postcss: - specifier: ^8 - version: 8.5.3 - tailwindcss: - specifier: ^3.4.1 - version: 3.4.17 - typescript: - specifier: ^5 - version: 5.6.3 - apps/cs: dependencies: '@common/components':