@lmy54321/design-system 1.3.12 → 1.3.14

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
@@ -3761,7 +3761,7 @@ function GridSystemDocs() {
3761
3761
  }
3762
3762
 
3763
3763
  // index.ts
3764
- var VERSION = "1.3.12";
3764
+ var VERSION = "1.3.14";
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.12";
3743
+ var VERSION = "1.3.14";
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.12",
3
+ "version": "1.3.14",
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
@@ -16,14 +16,17 @@ const cwd = process.cwd();
16
16
  const execOptions = {
17
17
  cwd,
18
18
  stdio: 'pipe',
19
- encoding: 'utf-8'
19
+ encoding: 'utf-8',
20
+ maxBuffer: 10 * 1024 * 1024 // 增加缓冲区到 10MB,防止超时
20
21
  };
21
22
 
22
- console.log('\n🚀 @lmy54321/design-system 项目初始化\n');
23
- console.log(`📂 初始化位置: ${cwd}\n`);
23
+ console.log('\n🚀 @lmy54321/design-system 项目初始化(完全自动化,无需交互)\n');
24
+ console.log(`📂 初始化位置: ${cwd}`);
25
+ console.log('⏳ 这个过程会自动完成,包括:创建项目、安装依赖、启动开发服务器\n');
26
+
24
27
 
25
28
  // ============================================================
26
- // 步骤 0: 清理目录(如果非空)
29
+ // 步骤 0: 目录检查(不删除任何文件,让 Vite 处理冲突)
27
30
  // ============================================================
28
31
 
29
32
  console.log('🔍 检查目录状态...');
@@ -33,12 +36,7 @@ try {
33
36
  );
34
37
 
35
38
  if (files.length > 0) {
36
- console.log('⚠️ 目录非空,正在清理...');
37
- for (const file of files) {
38
- const filePath = resolve(cwd, file);
39
- rmSync(filePath, { recursive: true, force: true });
40
- }
41
- console.log('✅ 目录已清理\n');
39
+ console.log('✅ 目录非空,将覆盖已有文件\n');
42
40
  } else {
43
41
  console.log('✅ 目录为空\n');
44
42
  }
@@ -53,7 +51,19 @@ try {
53
51
 
54
52
  console.log('📦 步骤 1/5: 创建 Vite 项目...');
55
53
  try {
56
- execSync('npm create vite@latest . -- --template react-ts --yes', execOptions);
54
+ // 如果是非空目录,先删除可能冲突的 Vite 默认文件
55
+ const conflictFiles = ['src', 'public', 'index.html', 'vite.config.ts', 'tsconfig.json', 'package.json'];
56
+ for (const file of conflictFiles) {
57
+ const filePath = resolve(cwd, file);
58
+ if (existsSync(filePath)) {
59
+ rmSync(filePath, { recursive: true, force: true });
60
+ }
61
+ }
62
+
63
+ execSync('npm create vite@latest . -- --template react-ts --yes', {
64
+ ...execOptions,
65
+ timeout: 120000 // 2 分钟
66
+ });
57
67
  console.log('✅ Vite 项目已创建\n');
58
68
  } catch (error) {
59
69
  console.error('❌ 创建 Vite 项目失败:', error.message);
@@ -66,7 +76,11 @@ try {
66
76
 
67
77
  console.log('📦 步骤 2/5: 安装依赖...');
68
78
  try {
69
- execSync('npm install && npm install @lmy54321/design-system tailwindcss @tailwindcss/vite react-router-dom motion', execOptions);
79
+ // 设置更长的超时时间(10分钟),因为 npm install 可能需要时间
80
+ execSync('npm install && npm install @lmy54321/design-system tailwindcss @tailwindcss/vite react-router-dom motion', {
81
+ ...execOptions,
82
+ timeout: 600000 // 10 分钟
83
+ });
70
84
  console.log('✅ 依赖安装完成\n');
71
85
  } catch (error) {
72
86
  console.error('❌ 依赖安装失败:', error.message);