Creating a Custom Maker
This code demonstrates how to create a custom maker by extending the MakerBase class. The custom maker can implement its own logic for packaging an Electron application.
const { MakerBase } = require('@electron-forge/maker-base');
class MyCustomMaker extends MakerBase {
constructor() {
super();
this.name = 'my-custom-maker';
}
async make({ dir, appName, targetPlatform, targetArch }) {
console.log(`Making ${appName} for ${targetPlatform} on ${targetArch}`);
// Custom packaging logic here
}
}
module.exports = MyCustomMaker;