-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathelectron-builder.config.js
More file actions
59 lines (53 loc) · 1.21 KB
/
Copy pathelectron-builder.config.js
File metadata and controls
59 lines (53 loc) · 1.21 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// @ts-check
const arch = (process.env.npm_config_arch || process.env.M_ARCH || process.arch) === "arm64" ? "arm64" : "x64";
/**
* @type import("electron-builder").Configuration
*/
const build = {
appId: "com.myde.app",
executableName: "myde",
directories: {
output: "build",
},
icon: "./assets/logo",
electronDownload: {
mirror: "https://npmmirror.com/mirrors/electron/",
},
npmRebuild: false,
asar: false,
artifactName: `\${productName}-\${version}-\${platform}-${arch}.\${ext}`,
linux: {
category: "Utility",
target: [
{ target: "tar.gz", arch },
{ target: "deb", arch },
{ target: "rpm", arch },
],
files: [],
},
afterPack: async (c) => {},
};
/** @type {string[]|undefined} */
// @ts-ignore
const files = build.linux?.files;
const ignoreDir = [
".*",
"tsconfig*",
"*.md",
"*.js",
"*.yaml",
"**/*.map",
"**/*.ts",
"src",
"docs",
"test",
"node_modules/**/*.flow",
"node_modules/**/*.md",
"node_modules/**/**esm**",
"node_modules/**/*.es*",
];
for (let i of ignoreDir) {
i = `!${i}`;
files?.push(i);
}
module.exports = build;