@interopio/desktop-cli
Version:
CLI tool for setting up, building and packaging io.Connect Desktop projects
47 lines (45 loc) • 1.96 kB
JavaScript
// forge.config.js
const path = require('path');
module.exports = {
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
// see https://github.com/electron/windows-installer for all of the options
// loadingGif: "" // The local path to a .gif file to display during install.
// iconUrl: "" // A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). e.g., "https://example.com/icon.ico"
}
},
{ name: '@electron-forge/maker-zip' },
{ name: '@electron-forge/maker-dmg' },
],
publishers: [
// {
// name: '@electron-forge/publisher-electron-release-server',
// config: {
// baseUrl: 'http://localhost:8080/',
// username: 'username',
// password: 'password'
// }
// }
],
// DO NOT REMOVE - keep these hooks
hooks: {
async postMake(_config, makeResults) {
// we need to store the make results after the first publish call. We need the make results to sign the artifacts
const fs = require('fs');
const path = require('path');
const out = path.resolve(__dirname, 'dist', 'makeResults.json');
fs.mkdirSync(path.dirname(out), { recursive: true });
fs.writeFileSync(out, JSON.stringify(makeResults, null, 2));
return makeResults;
},
readPackageJson: async (_forgeConfig, packageJson) => {
// we need this so we don't need to install electron as a dev dependency; the version specified does not matter
if (!packageJson.devDependencies.electron) {
packageJson.devDependencies["electron"] = "38.0.0";
}
return packageJson;
}
},
};