@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 +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/scripts/init.mjs +26 -1
- package/template/src/pages/DevPortal.tsx +1 -1
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -3740,7 +3740,7 @@ function GridSystemDocs() {
|
|
|
3740
3740
|
}
|
|
3741
3741
|
|
|
3742
3742
|
// index.ts
|
|
3743
|
-
var VERSION = "1.3.
|
|
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
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
|
// ============================================================
|