Skip to main content

Abstract Class: ElectronBuilderForgeMaker<C>

Base class for electron-builder's Electron Forge makers. Structurally compatible with MakerBase from @electron-forge/maker-base (Forge 6+), without depending on it: Forge instantiates the package's default export with new Maker(config, platforms), or accepts an instance directly in makers.

Type Parameters​

C​

C extends object = object

Constructors​

Constructor​

new ElectronBuilderForgeMaker<C>(configOrConfigFetcher?, platformsToMakeOn?): ElectronBuilderForgeMaker<C>

Parameters​

configOrConfigFetcher?​

ForgeMakerConfig<C>

platformsToMakeOn?​

readonly string[] | null

Returns​

ElectronBuilderForgeMaker<C>

Properties​

config​

config: C | undefined

The resolved maker config, set by prepareConfig().


defaultPlatforms​

abstract readonly defaultPlatforms: ForgePlatform[]


name​

abstract readonly name: string


platformsToMakeOn?​

protected readonly optional platformsToMakeOn?: readonly string[] | null


requiredExternalBinaries​

readonly requiredExternalBinaries: string[] = []

Accessors​

__isElectronForgeMaker​

Get Signature​

get __isElectronForgeMaker(): true

Forge identifies maker instances in makers by this flag.

Returns​

true


platforms​

Get Signature​

get platforms(): ForgePlatform[]

Returns​

ForgePlatform[]

Methods​

clone()​

clone(): ElectronBuilderForgeMaker<C>

Returns​

ElectronBuilderForgeMaker<C>


ensureExternalBinariesExist()​

ensureExternalBinariesExist(): void

Returns​

void


externalBinariesExist()​

externalBinariesExist(): boolean

Returns​

boolean


getBuildOptions()​

getBuildOptions(options): PackagerOptions

Maps Forge's make() options onto the electron-builder build() options for this maker's target.

Parameters​

options​

ForgeMakerOptions

Returns​

PackagerOptions


getTarget()​

abstract protected getTarget(targetArch, config): ForgeMakerTarget

The electron-builder targets for targetArch, with the maker config applied to the target's configuration key.

Parameters​

targetArch​

string

config​

C | undefined

Returns​

ForgeMakerTarget


isSupportedOnCurrentPlatform()​

isSupportedOnCurrentPlatform(): boolean

Returns​

boolean


make()​

make(options): Promise<string[]>

Parameters​

options​

ForgeMakerOptions

Returns​

Promise<string[]>


prepareConfig()​

prepareConfig(targetArch): Promise<void>

Parameters​

targetArch​

string

Returns​

Promise<void>