forked from nklayman/vue-cli-plugin-electron-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
56 lines (52 loc) · 1.84 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { Application, AppConstructorOptions } from 'spectron'
import { Configuration as ElectronBuilderOptions } from 'electron-builder'
import * as ChainableWebpackConfig from 'webpack-chain'
interface Options {
/**
Do not launch spectron.
You will have to launch it on your own.
*/
noSpectron: boolean
/** Launch server in dev mode, not in production. */
forceDev: boolean
/** Custom spectron options.These will be merged with default options. */
spectronOptions: AppConstructorOptions
/** Do not start app or wait for it to load.
You will have to run app.start() and app.client.waitUntilWindowLoaded() yourself.
*/
noStart: boolean
/** Set custom Vue env mode. Defaults to 'test' */
mode: string
}
interface Server {
/** Spectron instance. */
app: Application
/** URL of dev server. */
url: string
/** Close spectron and stop dev server (must be called to prevent continued async operations). */
stopServe: () => Promise<Application>
/** Log of dev server. */
stdout: string
}
/**
Run electron:serve, but instead of launching Electron it returns a Spectron Application instance.
Used for e2e testing with Spectron.
*/
export function testWithSpectron(spectron: any, options?: Partial<Options>): Promise<Server>
export type PluginOptions = {
builderOptions?: ElectronBuilderOptions,
chainWebpackMainProcess?: (config?: ChainableWebpackConfig) => void,
chainWebpackRendererProcess?: (config?: ChainableWebpackConfig) => void,
mainProcessFile?: string,
rendererProcessFile?: string,
mainProcessWatch?: string[],
mainProcessArgs?: string[],
outputDir?: string,
disableMainProcessTypescript?: boolean,
mainProcessTypeChecking?: boolean,
customFileProtocol?: string,
removeElectronJunk?: boolean,
externals?: string[],
nodeModulesPath?: string[],
preload?: string | Record<string, string>
}