Skip to content

electron builder.Class.Packager

Electron-Builder / electron-builder / Packager

Constructors

new Packager()

new Packager(options, cancellationToken?): Packager

Parameters

options: PackagerOptions

cancellationToken?: CancellationToken

Returns

Packager

Properties

_appInfo

_appInfo: null | AppInfo


cancellationToken

readonly cancellationToken: CancellationToken


debugLogger

readonly debugLogger: DebugLogger


eventEmitter

readonly eventEmitter: EventEmitter<[never]>


isTwoPackageJsonProjectLayoutUsed

isTwoPackageJsonProjectLayoutUsed: boolean


options

readonly options: PackagerOptions


projectDir

readonly projectDir: string


stageDirPathCustomizer()

stageDirPathCustomizer: (target, packager, arch) => string

Parameters

target: Target

packager: PlatformPackager<any>

arch: Arch

Returns

string


tempDirManager

readonly tempDirManager: TmpDir

Accessors

appDir

get appDir(): string

Returns

string


appInfo

get appInfo(): AppInfo

Returns

AppInfo


areNodeModulesHandledExternally

get areNodeModulesHandledExternally(): boolean

Returns

boolean


buildResourcesDir

get buildResourcesDir(): string

Returns

string


config

get config(): Configuration

Returns

Configuration


devMetadata

get devMetadata(): null | Metadata

Returns

null | Metadata


framework

get framework(): Framework

Returns

Framework


isPrepackedAppAsar

get isPrepackedAppAsar(): boolean

Returns

boolean


metadata

get metadata(): Metadata

Returns

Metadata


relativeBuildResourcesDirname

get relativeBuildResourcesDirname(): string

Returns

string


repositoryInfo

get repositoryInfo(): Promise<null | SourceRepositoryInfo>

Returns

Promise<null | SourceRepositoryInfo>

Methods

addAfterPackHandler()

addAfterPackHandler(handler): void

Parameters

handler

Returns

void


afterPack()

afterPack(context): Promise<any>

Parameters

context: PackContext

Returns

Promise<any>


artifactCreated()

artifactCreated(handler): Packager

Parameters

handler

Returns

Packager


build()

build(repositoryInfo?): Promise<BuildResult>

Parameters

repositoryInfo?: SourceRepositoryInfo

Returns

Promise<BuildResult>


callAppxManifestCreated()

callAppxManifestCreated(path): Promise<void>

Parameters

path: string

Returns

Promise<void>


callArtifactBuildCompleted()

callArtifactBuildCompleted(event): Promise<void>

Parameters

event: ArtifactCreated

Returns

Promise<void>


callArtifactBuildStarted()

callArtifactBuildStarted(event, logFields?): Promise<void>

Parameters

event: ArtifactBuildStarted

logFields?: any

Returns

Promise<void>


callMsiProjectCreated()

callMsiProjectCreated(path): Promise<void>

Parameters

path: string

Returns

Promise<void>


dispatchArtifactCreated()

dispatchArtifactCreated(event): void

Only for sub artifacts (update info), for main artifacts use callArtifactBuildCompleted.

Parameters

event: ArtifactCreated

Returns

void


disposeOnBuildFinish()

disposeOnBuildFinish(disposer): void

Parameters

disposer

Returns

void


getNodeDependencyInfo()

getNodeDependencyInfo(platform, flatten?): Lazy<(NodeModuleDirInfo | NodeModuleInfo)[]>

Parameters

platform: null | Platform

flatten?: boolean

Returns

Lazy<(NodeModuleDirInfo | NodeModuleInfo)[]>


installAppDependencies()

installAppDependencies(platform, arch): Promise<any>

Parameters

platform: Platform

arch: Arch

Returns

Promise<any>


validateConfig()

validateConfig(): Promise<void>

Returns

Promise<void>