home 6 сар өмнө
commit
cd98751810
9 өөрчлөгдсөн 185 нэмэгдсэн , 0 устгасан
  1. 24 0
      .gitignore
  2. 38 0
      README.md
  3. 33 0
      eslint.config.js
  4. 13 0
      index.html
  5. 29 0
      package.json
  6. 13 0
      src/App.jsx
  7. 12 0
      src/index.css
  8. 10 0
      src/main.jsx
  9. 13 0
      vite.config.js

+ 24 - 0
.gitignore

@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 38 - 0
README.md

@@ -0,0 +1,38 @@
+### 프로젝트 초기 설정
+##### 1. 프로젝트 생성
+```
+npm create vite@latest ucell-clone -- --template react (TypeScript 사용시 --template react-ts)
+```
+
+##### 2. 라이브러리 설치
+- tailwindcss : 유틸리티 기반 CSS 프레임워크
+- postcss : Tailwind의 CSS 빌드 및 후처리 엔진
+- autoprefixer : 브라우저 호환 CSS 프리픽스 자동 추가
+```
+npm install tailwindcss @tailwindcss/vite
+```
+
+##### 3. 📁 기본 폴더 구조
+```
+ucell-clone/
+├── public/ # 정적 파일
+├── src/
+│ ├── assets/ # 이미지 및 기타 정적 리소스
+│ ├── components/ # 재사용 가능한 UI 컴포넌트
+│ ├── pages/ # 페이지 단위 컴포넌트
+│ ├── layouts/ # 공통 레이아웃 컴포넌트
+│ ├── App.jsx # 루트 컴포넌트
+│ ├── main.jsx # 진입점
+│ └── index.css # Tailwind 지시어 포함
+├── tailwind.config.js # Tailwind 설정 파일
+├── postcss.config.js # PostCSS 설정 파일
+├── vite.config.js # Vite 설정 파일
+├── package.json
+└── README.md
+```
+
+
+
+### 시작
+1. npm install
+2. npm run dev

+ 33 - 0
eslint.config.js

@@ -0,0 +1,33 @@
+import js from '@eslint/js'
+import globals from 'globals'
+import reactHooks from 'eslint-plugin-react-hooks'
+import reactRefresh from 'eslint-plugin-react-refresh'
+
+export default [
+  { ignores: ['dist'] },
+  {
+    files: ['**/*.{js,jsx}'],
+    languageOptions: {
+      ecmaVersion: 2020,
+      globals: globals.browser,
+      parserOptions: {
+        ecmaVersion: 'latest',
+        ecmaFeatures: { jsx: true },
+        sourceType: 'module',
+      },
+    },
+    plugins: {
+      'react-hooks': reactHooks,
+      'react-refresh': reactRefresh,
+    },
+    rules: {
+      ...js.configs.recommended.rules,
+      ...reactHooks.configs.recommended.rules,
+      'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
+      'react-refresh/only-export-components': [
+        'warn',
+        { allowConstantExport: true },
+      ],
+    },
+  },
+]

+ 13 - 0
index.html

@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Vite + React</title>
+  </head>
+  <body>
+    <div id="root"></div>
+    <script type="module" src="/src/main.jsx"></script>
+  </body>
+</html>

+ 29 - 0
package.json

@@ -0,0 +1,29 @@
+{
+  "name": "bandosj",
+  "private": true,
+  "version": "0.0.0",
+  "type": "module",
+  "scripts": {
+    "dev": "vite",
+    "build": "vite build",
+    "lint": "eslint .",
+    "preview": "vite preview"
+  },
+  "dependencies": {
+    "@tailwindcss/vite": "^4.1.7",
+    "react": "^19.1.0",
+    "react-dom": "^19.1.0",
+    "tailwindcss": "^4.1.7"
+  },
+  "devDependencies": {
+    "@eslint/js": "^9.25.0",
+    "@types/react": "^19.1.2",
+    "@types/react-dom": "^19.1.2",
+    "@vitejs/plugin-react": "^4.4.1",
+    "eslint": "^9.25.0",
+    "eslint-plugin-react-hooks": "^5.2.0",
+    "eslint-plugin-react-refresh": "^0.4.19",
+    "globals": "^16.0.0",
+    "vite": "^6.3.5"
+  }
+}

+ 13 - 0
src/App.jsx

@@ -0,0 +1,13 @@
+import { useState } from 'react'
+
+function App() {
+  
+
+  return (
+    <>
+      
+    </>
+  )
+}
+
+export default App

+ 12 - 0
src/index.css

@@ -0,0 +1,12 @@
+@import "tailwindcss";
+
+/* 전역 글꼴 및 렌더링 설정 */
+:root {
+  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
+  line-height: 1.5;
+  font-weight: 400;
+  font-synthesis: none;
+  text-rendering: optimizeLegibility;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}

+ 10 - 0
src/main.jsx

@@ -0,0 +1,10 @@
+import { StrictMode } from 'react'
+import { createRoot } from 'react-dom/client'
+import './index.css'
+import App from './App.jsx'
+
+createRoot(document.getElementById('root')).render(
+  <StrictMode>
+    <App />
+  </StrictMode>,
+)

+ 13 - 0
vite.config.js

@@ -0,0 +1,13 @@
+// vite.config.js
+import { defineConfig } from 'vite'
+import tailwindcss from '@tailwindcss/vite'
+import react from '@vitejs/plugin-react'
+
+export default defineConfig({
+  plugins: [react(), tailwindcss()],
+  server: {
+    host: true, // 0.0.0.0 으로 바인딩
+    port: 5173,
+    allowedHosts: ['dev.jonghyun2.com'] // 이 부분 추가
+  }
+})