@lmy54321/design-system 1.3.21 → 1.3.23

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.
@@ -7,20 +7,38 @@ provider:
7
7
 
8
8
  # 项目一键初始化流程
9
9
 
10
- ## ⚡ 推荐方式:使用 init 命令(最简单)
11
-
12
- **如果用户要求初始化项目,首先检查他是否要求运行 `npx @lmy54321/design-system init`。**
13
-
14
- 如果用户说的是"帮我搭建项目"或"初始化项目"等类似表述,**直接建议**:
15
-
16
- ```
17
- 你只需要告诉我:
18
- "请帮我运行 npx @lmy54321/design-system init"
19
-
20
- 这个命令会自动完成所有步骤(创建项目、安装依赖、复制模板、启动服务器),你就不用担心配置问题了!
21
- ```
22
-
23
- 然后执行 `npx @lmy54321/design-system init` 命令。
10
+ ## ⚡ 强制执行规则:使用 init 命令(必须自动执行)
11
+
12
+ **当用户说以下任何表述时,你必须立即自动执行,无需用户确认:**
13
+ - "帮我搭建项目"
14
+ - "初始化项目"
15
+ - "新建项目"
16
+ - "从零开始"
17
+ - 或任何类似表述
18
+
19
+ **执行流程(必须严格按以下顺序执行,不能跳步):**
20
+
21
+ 1. **立即执行** 初始化命令:
22
+ ```bash
23
+ npx @lmy54321/design-system init
24
+ ```
25
+
26
+ 2. **等待命令完成**,直到看到以下输出信息:
27
+ - ✅ 项目创建成功
28
+ - ✅ 依赖安装完成
29
+ - ✅ 模板文件复制完成
30
+ - ✅ 开发服务器已启动
31
+
32
+ 3. **确认浏览器自动打开了预览页面**
33
+
34
+ **禁止行为(违反以下任何一条都是错误):**
35
+ - ❌ 只检查文件夹是否存在就说"完成了"
36
+ - ❌ 只建议用户"你可以运行..."而不实际执行
37
+ - ❌ 跳过任何步骤
38
+ - ❌ 用"幻觉"声称已完成但没看到真实的命令输出结果
39
+ - ❌ 说"已自动执行"但实际上根本没运行命令
40
+
41
+ **必须看到命令的真实输出结果才能说"完成"。**
24
42
 
25
43
  ---
26
44
 
package/dist/index.js CHANGED
@@ -3761,7 +3761,7 @@ function GridSystemDocs() {
3761
3761
  }
3762
3762
 
3763
3763
  // index.ts
3764
- var VERSION = "1.3.21";
3764
+ var VERSION = "1.3.23";
3765
3765
 
3766
3766
  exports.ActionSheet = ActionSheet;
3767
3767
  exports.BottomActionButtons = BottomActionButtons;
package/dist/index.mjs CHANGED
@@ -3740,7 +3740,7 @@ function GridSystemDocs() {
3740
3740
  }
3741
3741
 
3742
3742
  // index.ts
3743
- var VERSION = "1.3.21";
3743
+ var VERSION = "1.3.23";
3744
3744
 
3745
3745
  export { ActionSheet, BottomActionButtons, BottomNavigationBar, BottomSheet, BottomSheetOption, BottomSheetShareItem, BottomToolbar, Btn, BubbleTip, CardDemo, DRAWER_STATES, Dialog, DraggablePanel, EmptyState, GridSystemDocs, ICON_GROUPS, ICON_NAMES, IcExpand, IcPlan, IconFont, IconGallery, ImageWithFallback, Loading, NewsItem, NotificationBar, POIListItem, PoiItem, Push, SearchBox, SegmentedControl, StatGrid, Switch, Tag, TencentMap, Toast, TopToolbar, TypographyDocs, VERSION, cn, hasFilledVariant };
3746
3746
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmy54321/design-system",
3
- "version": "1.3.21",
3
+ "version": "1.3.23",
4
4
  "description": "A comprehensive React component library and design system based on Tailwind CSS and Motion.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/scripts/init.mjs CHANGED
@@ -135,7 +135,12 @@ try {
135
135
  for (const file of filesToRemove) {
136
136
  const filePath = resolve(cwd, file);
137
137
  if (existsSync(filePath)) {
138
- execSync(`rm -f ${filePath}`, { shell: true });
138
+ try {
139
+ rmSync(filePath, { recursive: true, force: true });
140
+ } catch (e) {
141
+ // 忽略删除失败,继续执行
142
+ console.warn(`⚠️ 无法删除 ${file},继续...`);
143
+ }
139
144
  }
140
145
  }
141
146
 
@@ -194,8 +199,15 @@ console.log('✅ 已同步规则文件到 .codebuddy/rules\n');
194
199
 
195
200
  console.log('接下来:');
196
201
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
197
- console.log('1️⃣ 运行开发服务器:');
198
- console.log(' npm run dev\n');
199
- console.log('2️⃣ 打开浏览器访问 http://localhost:5173\n');
200
- console.log('3️⃣ 开始开发!\n');
201
- console.log('💡 所有组件已从 @lmy54321/design-system 导入\\n');
202
+ console.log('启动开发服务器中...\n');
203
+
204
+ // 启动开发服务器
205
+ const dev = spawn('npm', ['run', 'dev'], {
206
+ cwd,
207
+ stdio: 'inherit' // 将输出直接显示给用户
208
+ });
209
+
210
+ dev.on('error', (error) => {
211
+ console.error('❌ 启动开发服务器失败:', error.message);
212
+ process.exit(1);
213
+ });