Skip to content

Commit 0739358

Browse files
authored
chore(types): add plugin options (#1254)
1 parent a528242 commit 0739358

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

index.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { Application, AppConstructorOptions } from 'spectron'
2+
import { Configuration as ElectronBuilderOptions } from 'electron-builder'
3+
import * as ChainableWebpackConfig from 'webpack-chain'
4+
25
interface Options {
36
/**
47
Do not launch spectron.
@@ -32,3 +35,22 @@ interface Server {
3235
Used for e2e testing with Spectron.
3336
*/
3437
export function testWithSpectron(spectron: any, options?: Options): Promise<Server>
38+
39+
40+
export type PluginOptions = {
41+
builderOptions?: ElectronBuilderOptions,
42+
chainWebpackMainProcess?: (config?: ChainableWebpackConfig) => void,
43+
chainWebpackRendererProcess?: (config?: ChainableWebpackConfig) => void,
44+
mainProcessFile?: string,
45+
rendererProcessFile?: string,
46+
mainProcessWatch?: string[],
47+
mainProcessArgs?: string[],
48+
outputDir?: string,
49+
disableMainProcessTypescript?: boolean,
50+
mainProcessTypeChecking?: boolean,
51+
customFileProtocol?: string,
52+
removeElectronJunk?: boolean,
53+
externals?: string[],
54+
nodeModulesPath?: string[],
55+
preload?: string | Record<string, string>
56+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "2.0.0-rc.6",
44
"description": "Easily Build Your Vue.js App For Desktop With Electron",
55
"main": "index.js",
6+
"types": "index.d.ts",
67
"homepage": "https://nklayman.github.io/vue-cli-plugin-electron-builder/",
78
"funding": "https://github.com/sponsors/nklayman",
89
"scripts": {

0 commit comments

Comments
 (0)