RenaiApp/scripts/forge.config.js

67 lines
1.4 KiB
JavaScript

const packageJson = require('../package.json');
const ignoreList = [
/^\/\.idea($|\/)/,
/^\/\.vscode($|\/)/,
/^\/\.husky($|\/)/,
/^\/\.nyc_output($|\/)/,
/^\/declarations($|\/)/,
/^\/templates($|\/)/,
/^\/test-paths($|\/)/,
/^\/types($|\/)/,
/^\/workspace($|\/)/,
/^\/scripts($|\/)/,
/^\/\.editorconfig/,
/^\/\.eslintignore/,
/^\/\.prettierignore/,
/^\/\.eslintrc\.json/,
/^\/\.gitignore/,
/^\/\.mocharc\.json/,
/^\/\.nycrc\.yml/,
/^\/\.prettierrc\.yml/,
/^\/CONTRIBUTING\.md/,
/^\/index\.html/,
/^\/ormconfig\.yml/,
/^\/package-lock\.json/,
/^\/tsconfig\.json/,
/^\/tsconfig\.renderer\.json/,
/^\/node_modules\/\.cache($|\/)/,
/^\/node_modules\/\.vite($|\/)/,
// test and mock files:
/^.*\.(spec|mock)\.(ts|js(\.map)?)/,
/^\/src\/.*\/test\/.*$/,
// original source and generated source map files:
/^\/src\/.*\.(ts|js\.map)/,
/^\/src\/(renderer($|\/)|renderer\.js)/,
];
const name = packageJson.productName;
if (name !== 'Renai') {
throw new TypeError(
`The product name "${name}" in package.json is not "Renai"! Change it before building but do not commit it.`,
);
}
module.exports = {
packagerConfig: {
icon: 'resources/icon',
ignore: ignoreList,
name: name,
},
electronRebuildConfig: {
force: true,
},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
name: name,
},
},
],
};