|
@@ -0,0 +1,18 @@
|
|
|
+const { execSync } = require('child_process');
|
|
|
+const { exit } = require('process');
|
|
|
+
|
|
|
+function run(cmd) {
|
|
|
+ console.log(`\n>>> ${cmd}`);
|
|
|
+ try {
|
|
|
+ execSync(cmd, { stdio: 'inherit', cwd: process.cwd() });
|
|
|
+ } catch (e) {
|
|
|
+ console.error(`命令失败: ${cmd}`, e.message);
|
|
|
+ exit(1);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+run('npm run build:h5');
|
|
|
+run('npm run prebuild:arm:linux');
|
|
|
+run('npm run build:electron:linux');
|
|
|
+
|
|
|
+console.log('\n✅ 全部构建完成');
|