Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MakerImpl

Hierarchy

  • Maker<any>
    • MakerImpl

Implements

  • IForgeMaker

Index

Constructors

constructor

  • new MakerImpl(configFetcher?: undefined | C | function, providedPlatforms?: ForgePlatform[] | undefined): MakerImpl
  • Parameters

    • Optional configFetcher: undefined | C | function
    • Optional providedPlatforms: ForgePlatform[] | undefined

    Returns MakerImpl

Properties

__isElectronForgeMaker

__isElectronForgeMaker: true

config

config: any

defaultPlatforms

defaultPlatforms: never[] = []

name

name: string = "impl"

platforms

platforms: ForgePlatform[]

Methods

ensureDirectory

  • ensureDirectory(dir: string): Promise<void>
  • Ensures the directory exists and is forced to be empty.

    I.e. If the directory already exists it is deleted and recreated, this is a destructive operation

    Parameters

    • dir: string

    Returns Promise<void>

ensureFile

  • ensureFile(file: string): Promise<void>
  • Ensures the path to the file exists and the file does not exist

    I.e. If the file already exists it is deleted and the path created

    Parameters

    • file: string

    Returns Promise<void>

isInstalled

  • isInstalled(module: string): boolean
  • Checks if the given module is installed, used for testing if optional dependencies are installed or not

    Parameters

    • module: string

    Returns boolean

isSupportedOnCurrentPlatform

  • isSupportedOnCurrentPlatform(): boolean
  • Makers must implement this method and return true or false indicating whether this maker can be run on the current platform. Normally this is just a process.platform check but it can be a deeper check for dependencies like fake-root or other required external build tools.

    If the issue is a missing dependency you should log out a HELPFUL error message telling the developer exactly what is missing and if possible how to get it.

    Returns boolean

make

  • make(opts: MakerOptions): Promise<string[]>
  • Makers must implement this method and return an array of absolute paths to the artifacts generated by your maker

    Parameters

    • opts: MakerOptions

    Returns Promise<string[]>

prepareConfig

  • prepareConfig(targetArch: ForgeArch): void
  • Parameters

    • targetArch: ForgeArch

    Returns void