-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelectron-builder.js
43 lines (41 loc) · 1018 Bytes
/
electron-builder.js
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
34
35
36
37
38
39
40
41
42
43
// @ts-check
const pkg = require('./electron/package.json');
const app = 'electron';
/** @type {import('electron-builder').Configuration} */
module.exports = {
appId: 'com.single-page-note.app',
productName: 'SingePageNote',
// https://github.com/electron-userland/electron-builder/issues/3984
electronVersion: pkg.devDependencies['electron'].replace(/^(~|\^)/, ''),
asar: true,
directories: {
app,
output: `release/${pkg.version}`,
buildResources: 'resource'
},
files: ['dist/**/*', 'build/**/*', 'package.json'],
mac: {
artifactName: '${productName}_${version}.${ext}',
target: ['dmg', 'pkg', 'zip']
},
win: {
target: [
{
target: 'nsis',
arch: ['x64']
}
],
artifactName: '${productName}_${version}.${ext}'
},
nsis: {
oneClick: false,
perMachine: false,
allowToChangeInstallationDirectory: true,
deleteAppDataOnUninstall: false
},
publish: {
provider: 'generic',
channel: 'latest',
url: ''
}
};