@electron-forge/plugin-base
. It can implement two methods, neither are required.getHook(hookName: string): Function
hookName
and either return a function to run for that hook or return a falsey value to indicate you have no hook to run. If you wish to run multiple hooks you should compose them into a single function yourself and return that composition.hookName
values and the parameters passed to the hook function you return are documented over in the Configuration section of the docs.startLogic(startOpts: StartOptions): Promise<ChildProcess | false>
electron-forge start
, if you return a ChildProcess
you can override the built in start logic and Electron Forge will not spawn it's own process, rather it will watch the one you returned. If you return false
forge will spawn Electron itself but you could still run custom logic such as started compilation for code or downloading certain binaries before the app starts.