2022-11-01 08:07:25 +01:00
|
|
|
var AllowedFirstParts = {
|
|
|
|
"package.json": true,
|
|
|
|
"dist": true,
|
|
|
|
"static": true,
|
|
|
|
"node_modules": true,
|
2022-11-02 05:18:40 +01:00
|
|
|
"bin": true,
|
2022-11-01 08:07:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
var AllowedNodeModules = {
|
|
|
|
"lzma-native": true,
|
|
|
|
"fs-ext": true,
|
|
|
|
"fsevents": true,
|
|
|
|
};
|
|
|
|
|
|
|
|
var modCache = {};
|
|
|
|
|
|
|
|
function ignoreFn(path) {
|
|
|
|
let parts = path.split("/");
|
|
|
|
if (parts.length <= 1) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
let firstPart = parts[1];
|
|
|
|
if (!AllowedFirstParts[firstPart]) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (firstPart == "node_modules") {
|
|
|
|
if (parts.length <= 2) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
let nodeModule = parts[2];
|
|
|
|
if (!modCache[nodeModule]) {
|
|
|
|
modCache[nodeModule] = true;
|
|
|
|
}
|
|
|
|
if (!AllowedNodeModules[nodeModule]) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-11-01 00:41:44 +01:00
|
|
|
module.exports = {
|
2022-11-01 08:07:25 +01:00
|
|
|
packagerConfig: {
|
|
|
|
ignore: ignoreFn,
|
|
|
|
files: [
|
|
|
|
"package.json",
|
|
|
|
"dist/*",
|
|
|
|
"static/*",
|
|
|
|
"node_modules/lzma-native/**",
|
|
|
|
"node_modules/fs-ext/**",
|
|
|
|
"node_modules/fsevents/**",
|
|
|
|
],
|
2022-12-06 00:00:53 +01:00
|
|
|
icon: "static/PromptIcon.icns",
|
2022-11-01 08:07:25 +01:00
|
|
|
},
|
2022-11-01 00:41:44 +01:00
|
|
|
rebuildConfig: {},
|
|
|
|
makers: [
|
|
|
|
{
|
|
|
|
name: '@electron-forge/maker-squirrel',
|
|
|
|
config: {},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '@electron-forge/maker-zip',
|
|
|
|
platforms: ['darwin'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '@electron-forge/maker-deb',
|
|
|
|
config: {},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '@electron-forge/maker-rpm',
|
|
|
|
config: {},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|