@coze-arch/cli 0.0.1-alpha.77c1b0 → 0.0.1-alpha.77c276
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/lib/__templates__/expo/.coze +7 -2
- package/lib/__templates__/expo/.cozeproj/scripts/{deploy_build.sh → dev_build.sh} +25 -25
- package/lib/__templates__/expo/.cozeproj/scripts/{deploy_run.sh → dev_run.sh} +45 -63
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +34 -0
- package/lib/__templates__/expo/_gitignore +1 -1
- package/lib/__templates__/expo/_npmrc +3 -5
- package/lib/__templates__/expo/client/app.config.ts +71 -0
- package/lib/__templates__/expo/client/metro.config.js +51 -0
- package/lib/__templates__/expo/client/package.json +92 -0
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +36 -12
- package/lib/__templates__/expo/client/src/app/index.ts +1 -0
- package/lib/__templates__/expo/client/{constants → src/constants}/theme.ts +10 -0
- package/lib/__templates__/expo/client/src/contexts/AuthContext.tsx +49 -0
- package/lib/__templates__/expo/client/{hooks → src/hooks}/useTheme.ts +1 -1
- package/lib/__templates__/expo/client/{screens → src/screens}/home/index.tsx +1 -5
- package/lib/__templates__/expo/client/src/screens/home/styles.ts +60 -0
- package/lib/__templates__/expo/client/{utils → src/utils}/index.ts +1 -2
- package/lib/__templates__/expo/client/tsconfig.json +24 -0
- package/lib/__templates__/expo/package.json +27 -13
- package/lib/__templates__/expo/pnpm-lock.yaml +426 -514
- package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
- package/lib/__templates__/expo/server/package.json +17 -0
- package/lib/__templates__/expo/{src → server/src}/index.ts +2 -2
- package/lib/__templates__/expo/template.config.js +1 -1
- package/lib/__templates__/expo/tsconfig.json +1 -24
- package/lib/__templates__/nextjs/.coze +3 -3
- package/lib/__templates__/nextjs/README.md +341 -19
- package/lib/__templates__/nextjs/_npmrc +1 -1
- package/lib/__templates__/nextjs/components.json +21 -0
- package/lib/__templates__/nextjs/package.json +54 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +7947 -1523
- package/lib/__templates__/nextjs/scripts/dev.sh +9 -27
- package/lib/__templates__/nextjs/src/app/globals.css +114 -11
- package/lib/__templates__/nextjs/src/app/layout.tsx +18 -18
- package/lib/__templates__/nextjs/src/components/ui/accordion.tsx +66 -0
- package/lib/__templates__/nextjs/src/components/ui/alert-dialog.tsx +157 -0
- package/lib/__templates__/nextjs/src/components/ui/alert.tsx +66 -0
- package/lib/__templates__/nextjs/src/components/ui/aspect-ratio.tsx +11 -0
- package/lib/__templates__/nextjs/src/components/ui/avatar.tsx +53 -0
- package/lib/__templates__/nextjs/src/components/ui/badge.tsx +46 -0
- package/lib/__templates__/nextjs/src/components/ui/breadcrumb.tsx +109 -0
- package/lib/__templates__/nextjs/src/components/ui/button-group.tsx +83 -0
- package/lib/__templates__/nextjs/src/components/ui/button.tsx +62 -0
- package/lib/__templates__/nextjs/src/components/ui/calendar.tsx +220 -0
- package/lib/__templates__/nextjs/src/components/ui/card.tsx +92 -0
- package/lib/__templates__/nextjs/src/components/ui/carousel.tsx +241 -0
- package/lib/__templates__/nextjs/src/components/ui/chart.tsx +357 -0
- package/lib/__templates__/nextjs/src/components/ui/checkbox.tsx +32 -0
- package/lib/__templates__/nextjs/src/components/ui/collapsible.tsx +33 -0
- package/lib/__templates__/nextjs/src/components/ui/command.tsx +184 -0
- package/lib/__templates__/nextjs/src/components/ui/context-menu.tsx +252 -0
- package/lib/__templates__/nextjs/src/components/ui/dialog.tsx +143 -0
- package/lib/__templates__/nextjs/src/components/ui/drawer.tsx +135 -0
- package/lib/__templates__/nextjs/src/components/ui/dropdown-menu.tsx +257 -0
- package/lib/__templates__/nextjs/src/components/ui/empty.tsx +104 -0
- package/lib/__templates__/nextjs/src/components/ui/field.tsx +248 -0
- package/lib/__templates__/nextjs/src/components/ui/form.tsx +167 -0
- package/lib/__templates__/nextjs/src/components/ui/hover-card.tsx +44 -0
- package/lib/__templates__/nextjs/src/components/ui/input-group.tsx +170 -0
- package/lib/__templates__/nextjs/src/components/ui/input-otp.tsx +77 -0
- package/lib/__templates__/nextjs/src/components/ui/input.tsx +21 -0
- package/lib/__templates__/nextjs/src/components/ui/item.tsx +193 -0
- package/lib/__templates__/nextjs/src/components/ui/kbd.tsx +28 -0
- package/lib/__templates__/nextjs/src/components/ui/label.tsx +24 -0
- package/lib/__templates__/nextjs/src/components/ui/menubar.tsx +276 -0
- package/lib/__templates__/nextjs/src/components/ui/navigation-menu.tsx +168 -0
- package/lib/__templates__/nextjs/src/components/ui/pagination.tsx +127 -0
- package/lib/__templates__/nextjs/src/components/ui/popover.tsx +48 -0
- package/lib/__templates__/nextjs/src/components/ui/progress.tsx +31 -0
- package/lib/__templates__/nextjs/src/components/ui/radio-group.tsx +45 -0
- package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +56 -0
- package/lib/__templates__/nextjs/src/components/ui/scroll-area.tsx +58 -0
- package/lib/__templates__/nextjs/src/components/ui/select.tsx +190 -0
- package/lib/__templates__/nextjs/src/components/ui/separator.tsx +28 -0
- package/lib/__templates__/nextjs/src/components/ui/sheet.tsx +139 -0
- package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +726 -0
- package/lib/__templates__/nextjs/src/components/ui/skeleton.tsx +13 -0
- package/lib/__templates__/nextjs/src/components/ui/slider.tsx +63 -0
- package/lib/__templates__/nextjs/src/components/ui/sonner.tsx +40 -0
- package/lib/__templates__/nextjs/src/components/ui/spinner.tsx +16 -0
- package/lib/__templates__/nextjs/src/components/ui/switch.tsx +31 -0
- package/lib/__templates__/nextjs/src/components/ui/table.tsx +116 -0
- package/lib/__templates__/nextjs/src/components/ui/tabs.tsx +66 -0
- package/lib/__templates__/nextjs/src/components/ui/textarea.tsx +18 -0
- package/lib/__templates__/nextjs/src/components/ui/toggle-group.tsx +83 -0
- package/lib/__templates__/nextjs/src/components/ui/toggle.tsx +47 -0
- package/lib/__templates__/nextjs/src/components/ui/tooltip.tsx +61 -0
- package/lib/__templates__/nextjs/src/hooks/use-mobile.ts +19 -0
- package/lib/__templates__/nextjs/src/lib/utils.ts +6 -0
- package/lib/__templates__/nextjs/template.config.js +2 -2
- package/lib/__templates__/templates.json +6 -37
- package/lib/__templates__/vite/.coze +3 -3
- package/lib/__templates__/vite/README.md +204 -26
- package/lib/__templates__/vite/_npmrc +1 -1
- package/lib/__templates__/vite/package.json +1 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +120 -120
- package/lib/__templates__/vite/scripts/dev.sh +7 -26
- package/lib/__templates__/vite/template.config.js +11 -2
- package/lib/__templates__/vite/vite.config.ts +3 -3
- package/lib/cli.js +426 -249
- package/package.json +7 -4
- package/lib/__templates__/expo/app.json +0 -63
- package/lib/__templates__/expo/babel.config.js +0 -9
- package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +0 -43
- package/lib/__templates__/expo/client/app/(tabs)/home.tsx +0 -1
- package/lib/__templates__/expo/client/app/(tabs)/index.tsx +0 -7
- package/lib/__templates__/expo/client/app/+not-found.tsx +0 -79
- package/lib/__templates__/expo/client/contexts/AuthContext.tsx +0 -142
- package/lib/__templates__/expo/client/index.js +0 -12
- package/lib/__templates__/expo/client/screens/home/styles.ts +0 -332
- package/lib/__templates__/expo/metro.config.js +0 -53
- package/lib/__templates__/react-rsbuild/.coze +0 -11
- package/lib/__templates__/react-rsbuild/.vscode/settings.json +0 -121
- package/lib/__templates__/react-rsbuild/README.md +0 -61
- package/lib/__templates__/react-rsbuild/_gitignore +0 -97
- package/lib/__templates__/react-rsbuild/_npmrc +0 -22
- package/lib/__templates__/react-rsbuild/package.json +0 -31
- package/lib/__templates__/react-rsbuild/pnpm-lock.yaml +0 -997
- package/lib/__templates__/react-rsbuild/rsbuild.config.ts +0 -13
- package/lib/__templates__/react-rsbuild/scripts/build.sh +0 -14
- package/lib/__templates__/react-rsbuild/scripts/dev.sh +0 -51
- package/lib/__templates__/react-rsbuild/scripts/start.sh +0 -15
- package/lib/__templates__/react-rsbuild/src/App.tsx +0 -60
- package/lib/__templates__/react-rsbuild/src/index.css +0 -21
- package/lib/__templates__/react-rsbuild/src/index.html +0 -12
- package/lib/__templates__/react-rsbuild/src/index.tsx +0 -16
- package/lib/__templates__/react-rsbuild/tailwind.config.js +0 -9
- package/lib/__templates__/react-rsbuild/template.config.js +0 -54
- package/lib/__templates__/react-rsbuild/tsconfig.json +0 -17
- package/lib/__templates__/rsbuild/.coze +0 -11
- package/lib/__templates__/rsbuild/.vscode/settings.json +0 -7
- package/lib/__templates__/rsbuild/README.md +0 -61
- package/lib/__templates__/rsbuild/_gitignore +0 -97
- package/lib/__templates__/rsbuild/_npmrc +0 -22
- package/lib/__templates__/rsbuild/package.json +0 -24
- package/lib/__templates__/rsbuild/pnpm-lock.yaml +0 -888
- package/lib/__templates__/rsbuild/rsbuild.config.ts +0 -12
- package/lib/__templates__/rsbuild/scripts/build.sh +0 -14
- package/lib/__templates__/rsbuild/scripts/dev.sh +0 -51
- package/lib/__templates__/rsbuild/scripts/start.sh +0 -15
- package/lib/__templates__/rsbuild/src/index.css +0 -21
- package/lib/__templates__/rsbuild/src/index.html +0 -12
- package/lib/__templates__/rsbuild/src/index.ts +0 -5
- package/lib/__templates__/rsbuild/src/main.ts +0 -65
- package/lib/__templates__/rsbuild/tailwind.config.js +0 -9
- package/lib/__templates__/rsbuild/template.config.js +0 -56
- package/lib/__templates__/rsbuild/tsconfig.json +0 -16
- /package/lib/__templates__/expo/{eslint-formatter-simple.mjs → client/eslint-formatter-simple.mjs} +0 -0
- /package/lib/__templates__/expo/{eslint.config.mjs → client/eslint.config.mjs} +0 -0
- /package/lib/__templates__/expo/client/{app → src/app}/_layout.tsx +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/fonts/SpaceMono-Regular.ttf +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/adaptive-icon.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/default-avatar.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/favicon.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/icon.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/partial-react-logo.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/react-logo.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/react-logo@2x.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/react-logo@3x.png +0 -0
- /package/lib/__templates__/expo/client/{assets → src/assets}/images/splash-icon.png +0 -0
- /package/lib/__templates__/expo/client/{components → src/components}/Screen.tsx +0 -0
- /package/lib/__templates__/expo/client/{components → src/components}/SmartDateInput.tsx +0 -0
- /package/lib/__templates__/expo/client/{hooks → src/hooks}/useColorScheme.ts +0 -0
|
@@ -1,61 +1,239 @@
|
|
|
1
1
|
# <%= appName %>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
这是一个基于 TypeScript + Vite + Tailwind CSS 的轻量级 Web 应用项目,由扣子编程 CLI 创建。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 快速开始
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 启动开发服务器
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
coze dev
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
启动后,在浏览器中打开 [http://localhost:<%= port %>](http://localhost:<%= port %>) 查看应用。
|
|
14
|
+
|
|
15
|
+
开发服务器支持热更新(HMR),修改代码后页面会自动刷新。
|
|
16
|
+
|
|
17
|
+
### 构建生产版本
|
|
14
18
|
|
|
15
19
|
```bash
|
|
16
|
-
|
|
20
|
+
coze build
|
|
17
21
|
```
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
构建产物位于 `dist/` 目录,可直接部署到静态托管服务。
|
|
24
|
+
|
|
25
|
+
### 预览生产版本
|
|
20
26
|
|
|
21
27
|
```bash
|
|
22
|
-
coze
|
|
28
|
+
coze start
|
|
23
29
|
```
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
在本地启动一个静态服务器,预览生产构建的效果。
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
## 项目结构
|
|
28
34
|
|
|
29
|
-
```
|
|
30
|
-
|
|
35
|
+
```
|
|
36
|
+
├── index.html # HTML 入口文件
|
|
37
|
+
├── src/
|
|
38
|
+
│ ├── index.ts # 应用入口(初始化)
|
|
39
|
+
│ ├── main.ts # 主逻辑文件
|
|
40
|
+
│ └── index.css # 全局样式(包含 Tailwind 指令)
|
|
41
|
+
├── vite.config.ts # Vite 配置
|
|
42
|
+
├── tailwind.config.ts # Tailwind CSS 配置
|
|
43
|
+
└── tsconfig.json # TypeScript 配置
|
|
31
44
|
```
|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
## 核心开发规范
|
|
34
47
|
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
### 1. 样式开发
|
|
49
|
+
|
|
50
|
+
**使用 Tailwind CSS**
|
|
51
|
+
|
|
52
|
+
本项目使用 Tailwind CSS 进行样式开发,支持亮色/暗色模式自动切换。
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
// 使用 Tailwind 工具类
|
|
56
|
+
app.innerHTML = `
|
|
57
|
+
<div class="flex items-center justify-center min-h-screen bg-white dark:bg-black">
|
|
58
|
+
<h1 class="text-4xl font-bold text-black dark:text-white">
|
|
59
|
+
Hello World
|
|
60
|
+
</h1>
|
|
61
|
+
</div>
|
|
62
|
+
`;
|
|
37
63
|
```
|
|
38
64
|
|
|
39
|
-
|
|
65
|
+
**主题变量**
|
|
66
|
+
|
|
67
|
+
主题变量定义在 `src/index.css` 中,支持自动适配系统主题:
|
|
68
|
+
|
|
69
|
+
```css
|
|
70
|
+
:root {
|
|
71
|
+
--background: #ffffff;
|
|
72
|
+
--foreground: #171717;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@media (prefers-color-scheme: dark) {
|
|
76
|
+
:root {
|
|
77
|
+
--background: #0a0a0a;
|
|
78
|
+
--foreground: #ededed;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
40
82
|
|
|
41
|
-
|
|
83
|
+
**常用 Tailwind 类名**
|
|
84
|
+
|
|
85
|
+
- 布局:`flex`, `grid`, `container`, `mx-auto`
|
|
86
|
+
- 间距:`p-4`, `m-4`, `gap-4`, `space-x-4`
|
|
87
|
+
- 颜色:`bg-white`, `text-black`, `dark:bg-black`, `dark:text-white`
|
|
88
|
+
- 排版:`text-lg`, `font-bold`, `leading-8`, `tracking-tight`
|
|
89
|
+
- 响应式:`sm:`, `md:`, `lg:`, `xl:`
|
|
90
|
+
|
|
91
|
+
### 2. 依赖管理
|
|
92
|
+
|
|
93
|
+
**必须使用 pnpm 管理依赖**
|
|
42
94
|
|
|
43
95
|
```bash
|
|
44
|
-
|
|
96
|
+
# ✅ 安装依赖
|
|
97
|
+
pnpm install
|
|
98
|
+
|
|
99
|
+
# ✅ 添加新依赖
|
|
100
|
+
pnpm add package-name
|
|
101
|
+
|
|
102
|
+
# ✅ 添加开发依赖
|
|
103
|
+
pnpm add -D package-name
|
|
104
|
+
|
|
105
|
+
# ❌ 禁止使用 npm 或 yarn
|
|
106
|
+
# npm install # 错误!
|
|
107
|
+
# yarn add # 错误!
|
|
45
108
|
```
|
|
46
109
|
|
|
47
|
-
|
|
110
|
+
项目已配置 `preinstall` 脚本,使用其他包管理器会报错。
|
|
111
|
+
|
|
112
|
+
### 3. TypeScript 开发
|
|
113
|
+
|
|
114
|
+
**类型安全**
|
|
115
|
+
|
|
116
|
+
充分利用 TypeScript 的类型系统,确保代码质量:
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
// 定义接口
|
|
120
|
+
interface User {
|
|
121
|
+
id: number;
|
|
122
|
+
name: string;
|
|
123
|
+
email: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// 使用类型
|
|
127
|
+
function createUser(data: User): void {
|
|
128
|
+
console.log(`Creating user: ${data.name}`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// DOM 操作类型推断
|
|
132
|
+
const button = document.querySelector<HTMLButtonElement>('#my-button');
|
|
133
|
+
if (button) {
|
|
134
|
+
button.addEventListener('click', () => {
|
|
135
|
+
console.log('Button clicked');
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**避免 any 类型**
|
|
141
|
+
|
|
142
|
+
尽量避免使用 `any`,使用 `unknown` 或具体类型:
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
// ❌ 不推荐
|
|
146
|
+
function process(data: any) { }
|
|
147
|
+
|
|
148
|
+
// ✅ 推荐
|
|
149
|
+
function process(data: unknown) {
|
|
150
|
+
if (typeof data === 'string') {
|
|
151
|
+
console.log(data.toUpperCase());
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 常见开发场景
|
|
157
|
+
|
|
158
|
+
### 添加新页面
|
|
159
|
+
|
|
160
|
+
本项目是单页应用(SPA),如需多页面:
|
|
161
|
+
|
|
162
|
+
1. 在 `src/` 下创建新的 `.ts` 文件
|
|
163
|
+
2. 在 `vite.config.ts` 中配置多入口
|
|
164
|
+
3. 创建对应的 `.html` 文件
|
|
165
|
+
|
|
166
|
+
### DOM 操作
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
// 获取元素
|
|
170
|
+
const app = document.getElementById('app');
|
|
171
|
+
const button = document.querySelector<HTMLButtonElement>('.my-button');
|
|
172
|
+
|
|
173
|
+
// 动态创建元素
|
|
174
|
+
const div = document.createElement('div');
|
|
175
|
+
div.className = 'flex items-center gap-4';
|
|
176
|
+
div.textContent = 'Hello World';
|
|
177
|
+
app?.appendChild(div);
|
|
178
|
+
|
|
179
|
+
// 事件监听
|
|
180
|
+
button?.addEventListener('click', (e) => {
|
|
181
|
+
console.log('Clicked', e);
|
|
182
|
+
});
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### 数据获取
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
// Fetch API
|
|
189
|
+
async function fetchData() {
|
|
190
|
+
try {
|
|
191
|
+
const response = await fetch('https://api.example.com/data');
|
|
192
|
+
const data = await response.json();
|
|
193
|
+
return data;
|
|
194
|
+
} catch (error) {
|
|
195
|
+
console.error('Failed to fetch data:', error);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// 使用数据
|
|
200
|
+
fetchData().then(data => {
|
|
201
|
+
console.log(data);
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### 环境变量
|
|
206
|
+
|
|
207
|
+
在 `.env` 文件中定义环境变量(需以 `VITE_` 开头):
|
|
48
208
|
|
|
49
209
|
```bash
|
|
50
|
-
|
|
210
|
+
VITE_API_URL=https://api.example.com
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
在代码中使用:
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
const apiUrl = import.meta.env.VITE_API_URL;
|
|
217
|
+
console.log(apiUrl); // https://api.example.com
|
|
51
218
|
```
|
|
52
219
|
|
|
53
|
-
##
|
|
220
|
+
## 技术栈
|
|
221
|
+
|
|
222
|
+
- **构建工具**: Vite 6.x
|
|
223
|
+
- **语言**: TypeScript 5.x
|
|
224
|
+
- **样式**: Tailwind CSS 3.x
|
|
225
|
+
- **包管理器**: pnpm 9+
|
|
226
|
+
|
|
227
|
+
## 参考文档
|
|
54
228
|
|
|
55
|
-
-
|
|
229
|
+
- [Vite 官方文档](https://cn.vitejs.dev/)
|
|
230
|
+
- [TypeScript 官方文档](https://www.typescriptlang.org/zh/docs/)
|
|
231
|
+
- [Tailwind CSS 文档](https://tailwindcss.com/docs)
|
|
56
232
|
|
|
57
|
-
##
|
|
233
|
+
## 重要提示
|
|
58
234
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
235
|
+
1. **必须使用 pnpm** 作为包管理器
|
|
236
|
+
2. **使用 TypeScript** 进行类型安全开发,避免使用 `any`
|
|
237
|
+
3. **使用 Tailwind CSS** 进行样式开发,支持响应式和暗色模式
|
|
238
|
+
4. **环境变量必须以 `VITE_` 开头** 才能在客户端代码中访问
|
|
239
|
+
5. **开发时使用 `coze dev`**,支持热更新和快速刷新
|