UNPKG

1.28 kBTypeScriptView Raw
1import { FileTransformer } from "builder-util/out/fs";
2import { AsarIntegrity } from "./asar/integrity";
3import { Platform, PlatformPackager, ElectronPlatformName } from "./index";
4export interface Framework {
5 readonly name: string;
6 readonly version: string;
7 readonly distMacOsAppName: string;
8 readonly macOsDefaultTargets: Array<string>;
9 readonly defaultAppIdPrefix: string;
10 readonly isNpmRebuildRequired: boolean;
11 readonly isDefaultAppIconProvided: boolean;
12 getDefaultIcon?(platform: Platform): string;
13 prepareApplicationStageDirectory(options: PrepareApplicationStageDirectoryOptions): Promise<any>;
14 beforeCopyExtraFiles?(packager: PlatformPackager<any>, appOutDir: string, asarIntegrity: AsarIntegrity | null): Promise<any>;
15 createTransformer?(): FileTransformer | null;
16}
17export interface PrepareApplicationStageDirectoryOptions {
18 readonly packager: PlatformPackager<any>;
19 /**
20 * Platform doesn't process application output directory in any way. Unpack implementation must create or empty dir if need.
21 */
22 readonly appOutDir: string;
23 readonly platformName: ElectronPlatformName;
24 readonly arch: string;
25 readonly version: string;
26}
27export declare function isElectronBased(framework: Framework): boolean;