refactor: electron-builder use npm command

This commit is contained in:
草鞋没号 committed 2021-12-15 08:44:09 +08:00
1 parent 2820bdb760
commit 67f1d00193
4 files changed
+36 -47

No files matched your search

-13
View File
@@ -1,8 +1,6 @@
process.env.NODE_ENV = 'production'
import { build as viteBuild } from 'vite'
import { build as electronBuild, Platform } from 'electron-builder'
import { config as builderConfig } from '../configs/electron-builder.config.mjs'
import chalk from 'chalk'
const TAG = chalk.bgBlue('[build.mjs]')
@@ -25,16 +23,5 @@ async function buildElectron() {
}
}
async function packElectron() {
return electronBuild({
config: builderConfig,
// if you want to build windows platform
// targets: Platform.WINDOWS.createTarget(),
}).then(result => {
console.log(TAG, 'files:', chalk.green(result))
})
}
// bootstrap
await buildElectron()
await packElectron()