@lmy54321/design-system 1.3.11 → 1.3.13
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 +23 -11
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.13";
|
|
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
|
@@ -12,8 +12,18 @@ const __dirname = dirname(__filename);
|
|
|
12
12
|
const packageDir = resolve(__dirname, '..');
|
|
13
13
|
const cwd = process.cwd();
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
// 全局执行选项:使用 pipe 而非 inherit,便于 AI 自动化处理
|
|
16
|
+
const execOptions = {
|
|
17
|
+
cwd,
|
|
18
|
+
stdio: 'pipe',
|
|
19
|
+
encoding: 'utf-8',
|
|
20
|
+
maxBuffer: 10 * 1024 * 1024 // 增加缓冲区到 10MB,防止超时
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
console.log('\n🚀 @lmy54321/design-system 项目初始化(完全自动化,无需交互)\n');
|
|
24
|
+
console.log(`📂 初始化位置: ${cwd}`);
|
|
25
|
+
console.log('⏳ 这个过程会自动完成,包括:创建项目、安装依赖、启动开发服务器\n');
|
|
26
|
+
|
|
17
27
|
|
|
18
28
|
// ============================================================
|
|
19
29
|
// 步骤 0: 清理目录(如果非空)
|
|
@@ -46,13 +56,13 @@ try {
|
|
|
46
56
|
|
|
47
57
|
console.log('📦 步骤 1/5: 创建 Vite 项目...');
|
|
48
58
|
try {
|
|
49
|
-
execSync('npm create vite@latest . -- --template react-ts --yes', {
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
execSync('npm create vite@latest . -- --template react-ts --yes', {
|
|
60
|
+
...execOptions,
|
|
61
|
+
timeout: 120000 // 2 分钟
|
|
52
62
|
});
|
|
53
63
|
console.log('✅ Vite 项目已创建\n');
|
|
54
64
|
} catch (error) {
|
|
55
|
-
console.error('❌ 创建 Vite
|
|
65
|
+
console.error('❌ 创建 Vite 项目失败:', error.message);
|
|
56
66
|
process.exit(1);
|
|
57
67
|
}
|
|
58
68
|
|
|
@@ -62,13 +72,14 @@ try {
|
|
|
62
72
|
|
|
63
73
|
console.log('📦 步骤 2/5: 安装依赖...');
|
|
64
74
|
try {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
// 设置更长的超时时间(10分钟),因为 npm install 可能需要时间
|
|
76
|
+
execSync('npm install && npm install @lmy54321/design-system tailwindcss @tailwindcss/vite react-router-dom motion', {
|
|
77
|
+
...execOptions,
|
|
78
|
+
timeout: 600000 // 10 分钟
|
|
68
79
|
});
|
|
69
80
|
console.log('✅ 依赖安装完成\n');
|
|
70
81
|
} catch (error) {
|
|
71
|
-
console.error('❌
|
|
82
|
+
console.error('❌ 依赖安装失败:', error.message);
|
|
72
83
|
process.exit(1);
|
|
73
84
|
}
|
|
74
85
|
|
|
@@ -172,11 +183,12 @@ try {
|
|
|
172
183
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
|
|
173
184
|
console.log('🚀 启动开发服务器中...\n');
|
|
174
185
|
|
|
186
|
+
// 使用 inherit 模式启动开发服务器,保持交互式输出
|
|
175
187
|
execSync('npm run dev', {
|
|
176
188
|
cwd,
|
|
177
189
|
stdio: 'inherit'
|
|
178
190
|
});
|
|
179
191
|
} catch (error) {
|
|
180
|
-
console.error('❌
|
|
192
|
+
console.error('❌ 启动开发服务器失败:', error.message);
|
|
181
193
|
process.exit(1);
|
|
182
194
|
}
|