@kood/claude-code 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -409,7 +409,7 @@ var init = async (options) => {
|
|
|
409
409
|
|
|
410
410
|
// src/index.ts
|
|
411
411
|
var program = new Command();
|
|
412
|
-
program.name("claude-code").description("Claude Code documentation installer for projects").version("0.3.
|
|
412
|
+
program.name("claude-code").description("Claude Code documentation installer for projects").version("0.3.5");
|
|
413
413
|
program.option(
|
|
414
414
|
"-t, --template <names>",
|
|
415
415
|
"template names (comma-separated: tanstack-start,hono)"
|
package/package.json
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
| 분류 | 금지 |
|
|
17
17
|
|------|------|
|
|
18
|
+
| **라우트** | Flat 파일 라우트 (`routes/users.tsx`) |
|
|
19
|
+
| **Route Export** | `export const IndexRoute`, `const Route` (export 안함) |
|
|
18
20
|
| **API** | `/api` 라우터 생성 (Server Functions 사용) |
|
|
19
21
|
| **레이어** | Service Layer 건너뛰기, Routes에서 직접 DB 접근 |
|
|
20
22
|
| **검증** | Handler 내부 수동 검증, 인증 로직 분산 |
|
|
@@ -28,6 +30,8 @@
|
|
|
28
30
|
|
|
29
31
|
| 분류 | 필수 |
|
|
30
32
|
|------|------|
|
|
33
|
+
| **라우트 구조** | 페이지마다 폴더 생성 (`routes/users/index.tsx`) |
|
|
34
|
+
| **Route Export** | `export const Route = createFileRoute(...)` 필수 |
|
|
31
35
|
| **계층 구조** | Routes → Server Functions → Services → Database |
|
|
32
36
|
| **Route Group** | 목록 → `(main)/`, 생성/편집 → 외부 |
|
|
33
37
|
| **페이지 분리** | 100줄+ → `-components`, 200줄+ → `-sections` |
|
|
@@ -80,12 +84,60 @@
|
|
|
80
84
|
|
|
81
85
|
---
|
|
82
86
|
|
|
87
|
+
<route_export_rule>
|
|
88
|
+
|
|
89
|
+
## Route Export 규칙
|
|
90
|
+
|
|
91
|
+
> ⚠️ **`export const Route` 필수**
|
|
92
|
+
>
|
|
93
|
+
> TanStack Router는 모든 라우트 파일에서 **정확히 `Route`라는 이름**으로 내보내야 합니다.
|
|
94
|
+
>
|
|
95
|
+
> `tsr generate` 및 `tsr watch` 명령어가 자동으로 경로를 생성하고 업데이트합니다.
|
|
96
|
+
|
|
97
|
+
| ❌ 금지 | ✅ 필수 |
|
|
98
|
+
|--------|--------|
|
|
99
|
+
| `const Route = createFileRoute(...)` | `export const Route = createFileRoute(...)` |
|
|
100
|
+
| `export const IndexRoute = ...` | `export const Route = ...` |
|
|
101
|
+
| `export default createFileRoute(...)` | `export const Route = createFileRoute(...)` |
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
// ❌ 금지: export 없음
|
|
105
|
+
const Route = createFileRoute('/users')({
|
|
106
|
+
component: UsersPage,
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
// ❌ 금지: 다른 이름
|
|
110
|
+
export const UsersRoute = createFileRoute('/users')({
|
|
111
|
+
component: UsersPage,
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
// ✅ 필수: 정확히 'Route' 이름으로 export
|
|
115
|
+
export const Route = createFileRoute('/users')({
|
|
116
|
+
component: UsersPage,
|
|
117
|
+
})
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
</route_export_rule>
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
83
124
|
<layers>
|
|
84
125
|
|
|
85
126
|
## Layer Architecture
|
|
86
127
|
|
|
87
128
|
### 1. Routes Layer
|
|
88
129
|
|
|
130
|
+
> ⚠️ **페이지마다 폴더 생성 필수**
|
|
131
|
+
>
|
|
132
|
+
> 모든 페이지는 **반드시 폴더 구조**로 만들어야 합니다. Flat 파일 방식(`routes/users.tsx`)은 금지됩니다.
|
|
133
|
+
>
|
|
134
|
+
> **이유:** -components/, -functions/, -hooks/ 등 페이지 전용 리소스를 체계적으로 관리하기 위함입니다.
|
|
135
|
+
>
|
|
136
|
+
> | ❌ 금지 | ✅ 필수 |
|
|
137
|
+
> |--------|--------|
|
|
138
|
+
> | `routes/users.tsx` | `routes/users/index.tsx` |
|
|
139
|
+
> | `routes/posts.tsx` | `routes/posts/(main)/index.tsx` |
|
|
140
|
+
|
|
89
141
|
```
|
|
90
142
|
routes/<route-name>/
|
|
91
143
|
├── (main)/ # route group (목록 페이지)
|