Home Reference Source

Function

Static Public Summary
public

async import(providedOptions: ImportOptions): Promise

Attempt to import a given module directory to the Electron Forge standard.

public

async init(providedOptions: InitOptions): Promise

Initialize a new Electron Forge template project in the given directory.

public

async install(providedOptions: InstallOptions): Promise

Install an Electron application from GitHub.

public

async lint(providedOptions: LintOptions): Promise<null, string>

Lint a local Electron application.

public

async make(providedOptions: MakeOptions): Promise<Array<MakeResult>>

Make distributables for an Electron application.

public

async package(providedOptions: PackageOptions): Promise

Package an Electron application into an platform dependent format.

public

async publish(providedOptions: PublishOptions): Promise

Publish an Electron application into the given target service.

public

async start(providedOptions: StartOptions): Promise

Start an Electron application.

Static Public

public async import(providedOptions: ImportOptions): Promise source

import import from 'electron-forge/dist/api/import'

Attempt to import a given module directory to the Electron Forge standard.

  • Replaces the prebuilt electron package with the one that integrates with electron-compile
  • Sets up git and the correct NPM dependencies
  • Adds a template forge config to package.json

Params:

NameTypeAttributeDescription
providedOptions ImportOptions

Options for the import method

Return:

Promise

Will resolve when the import process is complete

public async init(providedOptions: InitOptions): Promise source

import init from 'electron-forge/dist/api/init'

Initialize a new Electron Forge template project in the given directory.

Params:

NameTypeAttributeDescription
providedOptions InitOptions

Options for the init method

Return:

Promise

Will resolve when the initialization process is complete

public async install(providedOptions: InstallOptions): Promise source

import install from 'electron-forge/dist/api/install'

Install an Electron application from GitHub. If you leave interactive as false, you MUST provide a chooseAsset function.

Params:

NameTypeAttributeDescription
providedOptions InstallOptions

Options for the install method

Return:

Promise

Will resolve when the install process is complete

public async lint(providedOptions: LintOptions): Promise<null, string> source

import lint from 'electron-forge/dist/api/lint'

Lint a local Electron application.

The promise will be rejected with the stdout+stderr of the linting process if linting fails or will be resolved if it succeeds.

Params:

NameTypeAttributeDescription
providedOptions LintOptions

Options for the Lint method

Return:

Promise<null, string>

Will resolve when the lint process is complete

public async make(providedOptions: MakeOptions): Promise<Array<MakeResult>> source

import make from 'electron-forge/dist/api/make'

Make distributables for an Electron application.

Params:

NameTypeAttributeDescription
providedOptions MakeOptions

Options for the make method

Return:

Promise<Array<MakeResult>>

Will resolve when the make process is complete

public async package(providedOptions: PackageOptions): Promise source

import package from 'electron-forge/dist/api/package'

Package an Electron application into an platform dependent format.

Params:

NameTypeAttributeDescription
providedOptions PackageOptions

Options for the Package method

Return:

Promise

Will resolve when the package process is complete

public async publish(providedOptions: PublishOptions): Promise source

import publish from 'electron-forge/dist/api/publish'

Publish an Electron application into the given target service.

Params:

NameTypeAttributeDescription
providedOptions PublishOptions

Options for the Publish method

Return:

Promise

Will resolve when the publish process is complete

public async start(providedOptions: StartOptions): Promise source

import start from 'electron-forge/dist/api/start'

Start an Electron application.

Params:

NameTypeAttributeDescription
providedOptions StartOptions

Options for the Publish method

Return:

Promise

Will resolve when the application is launched