forked from rapid7/awsaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackager.js
24 lines (22 loc) · 954 Bytes
/
packager.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
const packager = require('electron-packager');
const platforms = (process.env.PLATFORM) ? process.env.PLATFORM.split(',') : ['darwin', 'linux', 'win32'];
const ignoreRegex = new RegExp('^\\/(' +
// Insert files/directories in this project that should be ignored.
// Note: This regex is required because electron-packager's `ignore` property only accepts a regex
// See: https://github.com/electron-userland/electron-packager/blob/master/readme.md
// specifically: `You can use --ignore to ignore files and folders via a regular expression (not a glob pattern).`
'dist|src|test|public|.editorconfig|.eslintrc|.gitignore|.travis.yml|CHANGELOG.md|README.md' +
')(\\/|$)', 'g');
packager({
appBundleId: 'com.rapid7.awsaml',
arch: 'x64',
asar: true,
dir: __dirname,
helperBundleId: 'com.rapid7.awsaml.helper',
ignore: ignoreRegex,
name: 'Awsaml',
out: 'dist',
platform: platforms,
}).catch((err) => {
console.error(err);
});