123456789101112131415161718192021 |
- const { execSync} = require('child_process');
- const config = require('../package.json');
- // 执行命令并打印输出
- function runCommand(name, local) {
- try {
- execSync(`node ./scripts/build/nodeBuild.js ${name}.zip`, { stdio: 'inherit' });
- } catch (error) {
- console.error(`命令执行失败: ${error.message}`);
- process.exit(1);
- }
- }
- console.log(`----------------------------`)
- console.log(`准备开始打包: ${config.buildName}`);
- //打包官方版本
- runCommand(config.buildName, false);
- console.log(`----------------------------`)
- console.log('全部编译打包完成')
|