@lmy54321/design-system 1.3.9 → 1.3.10

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.9";
3764
+ var VERSION = "1.3.10";
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.9";
3743
+ var VERSION = "1.3.10";
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.9",
3
+ "version": "1.3.10",
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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { execSync } from 'child_process';
4
- import { existsSync, mkdirSync, copyFileSync, cpSync } from 'fs';
4
+ import { existsSync, mkdirSync, copyFileSync, cpSync, readdirSync, rmSync } from 'fs';
5
5
  import { resolve, dirname } from 'path';
6
6
  import { fileURLToPath } from 'url';
7
7
 
@@ -15,6 +15,31 @@ const cwd = process.cwd();
15
15
  console.log('\n🚀 @lmy54321/design-system 项目初始化\n');
16
16
  console.log(`📂 初始化位置: ${cwd}\n`);
17
17
 
18
+ // ============================================================
19
+ // 步骤 0: 清理目录(如果非空)
20
+ // ============================================================
21
+
22
+ console.log('🔍 检查目录状态...');
23
+ try {
24
+ const files = readdirSync(cwd).filter(f =>
25
+ !f.startsWith('.') && f !== 'node_modules'
26
+ );
27
+
28
+ if (files.length > 0) {
29
+ console.log('⚠️ 目录非空,正在清理...');
30
+ for (const file of files) {
31
+ const filePath = resolve(cwd, file);
32
+ rmSync(filePath, { recursive: true, force: true });
33
+ }
34
+ console.log('✅ 目录已清理\n');
35
+ } else {
36
+ console.log('✅ 目录为空\n');
37
+ }
38
+ } catch (error) {
39
+ console.error('❌ 目录检查失败:', error.message);
40
+ process.exit(1);
41
+ }
42
+
18
43
  // ============================================================
19
44
  // 步骤 1: 创建 Vite 项目
20
45
  // ============================================================
@@ -148,7 +148,7 @@ export function DevPortal() {
148
148
  npm 包
149
149
  </a>
150
150
  <span className="text-[13px] text-muted-foreground">
151
- 当前版本: v{designSystemPkg.version}
151
+ 当前版本: v{DESIGN_SYSTEM_VERSION}
152
152
  </span>
153
153
  </div>
154
154
  </motion.div>