You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,8 @@
1
1
# Vue CLI Plugin Electron Builder
2
2
3
3
A Vue Cli 3 plugin for Electron with no required configuration that uses [Electron Builder](https://www.electron.build/) and [Electron Webpack](https://webpack.electron.build/).
4
-
**IMPORTANT: Your app must be created with Vue-CLI 3 (vue create my-app), will not work with Vue-CLI 2 (vue init webpack my-app)**
4
+
5
+
**IMPORTANT: Your app must be created with Vue-CLI 3 (vue create my-app), will not work with Vue-CLI 2 (vue init webpack my-app)!**
5
6
6
7
## Quick Start:
7
8
@@ -34,6 +35,26 @@ or with NPM:
34
35
35
36
## Further Configuration:
36
37
38
+
### Folder Structure:
39
+
40
+
```
41
+
├── dist/ # where electron-webpack outputs compiled files (this will overwrite normal build files)
42
+
│ └── ...
43
+
├── dist_electron/
44
+
│ ├── [target platform]-unpacked # unpacked Electron app (main exe and supporting files)
45
+
| ├── [application name] setup [version].[target binary (exe|dmg|rpm...)] # installer for Electron app
46
+
│ └── ...
47
+
├── src/
48
+
| ├─── main/
49
+
| | └── [main|index].[js|ts] # Electron entry file (for Electron's main process)
├── electron-builder.[json|yml] # electron-builder configuration options (can also be placed in package.json under the "build" key)
53
+
├── electron-webpack.[json|yml] # electron-webpack configuration options (can also be placed in package.json under the "electronWebpack" key)
54
+
├── package.json # your app's package.json file
55
+
├── ...
56
+
```
57
+
37
58
### CLI Options
38
59
39
60
When building your app, any arguments will be passed to electron-builder. To pass an argument/arguments to electron-webpack, place them after --webpack.
@@ -42,7 +63,7 @@ When building your app, any arguments will be passed to electron-builder. To pas
Initial configuration is already set for you in your app's package.json, but it you want to modify it:
48
69
@@ -79,3 +100,7 @@ To see avalible options, check out [Electron Webpack Configuration Options](http
79
100
As per Electron Webpack's documentation, they can be applied:
80
101
81
102
> Configurations can be applied in `package.json` at `electronWebpack` or in a separate `electron-webpack.(json|json5|yml)`.
103
+
104
+
#### Adding TypeScript Support:
105
+
106
+
When you invoke/add vue-cli-plugin-electron-builder, it will ask you if you use TypeScript and configure accordingly. However, if you answered no and decide to add TypeScript later on, you must install electron-webpack-ts: `yarn add electron-webpack-ts --dev` (or with NPM: `npm install --save-dev electron-webpack-ts`).
0 commit comments