Ai
1 Star 0 Fork 20

keshui/AzurLaneAutoScript

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.js 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
LmeSzinc 提交于 2021-10-08 17:59 +08:00 . Add: Vite Electron Builder template
#!/usr/bin/node
const {build} = require('vite');
const {dirname} = require('path');
/** @type 'production' | 'development' | 'test' */
const mode = process.env.MODE = process.env.MODE || 'production';
const packagesConfigs = [
'packages/main/vite.config.js',
'packages/preload/vite.config.js',
'packages/renderer/vite.config.js',
];
/**
* Run `vite build` for config file
*/
const buildByConfig = (configFile) => build({configFile, mode});
(async () => {
try {
const totalTimeLabel = 'Total bundling time';
console.time(totalTimeLabel);
for (const packageConfigPath of packagesConfigs) {
const consoleGroupName = `${dirname(packageConfigPath)}/`;
console.group(consoleGroupName);
const timeLabel = 'Bundling time';
console.time(timeLabel);
await buildByConfig(packageConfigPath);
console.timeEnd(timeLabel);
console.groupEnd();
console.log('\n'); // Just for pretty print
}
console.timeEnd(totalTimeLabel);
} catch (e) {
console.error(e);
process.exit(1);
}
})();
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/keshui2021/AzurLaneAutoScript.git
git@gitee.com:keshui2021/AzurLaneAutoScript.git
keshui2021
AzurLaneAutoScript
AzurLaneAutoScript
master

搜索帮助