forked from mubaidr/vue-electron-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom-build.js
More file actions
33 lines (31 loc) · 716 Bytes
/
custom-build.js
File metadata and controls
33 lines (31 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const builder = require('electron-builder') // eslint-disable-line
const { Platform } = builder
console.log('running build...')
// Promise is returned
builder
.build({
targets: Platform.WINDOWS.createTarget(),
config: {
appId: 'org.mubaidr.vue-electron-template',
directories: {
output: 'build'
},
files: ['dist/electron/**/*'],
productName: 'productName',
win: {
icon: 'build/icons/icon.ico',
target: [
{
target: 'portable',
arch: ['x64']
}
]
}
}
})
.then((success) => {
console.log(`Success: ${success}`)
})
.catch((error) => {
console.log(`Error: ${error}`)
})