pack: add build for current os only
This commit is contained in:
1 parent
8d4375f3ad
commit
2aae3127d4
3 files changed
+9
-7
No files matched your search
@@ -8,13 +8,13 @@ For compatibility and security with the latest version of Electron, we do not re
|
||||
|
||||
Vutron's preload script is located in the `src/preload` folder. To create a new IPC communication channel, add the channel name to the following variable to whitelist it for communication.
|
||||
|
||||
* `mainAvailChannels`: Send an event from main to renderer. (`window.mainApi.send('channelName'')`)
|
||||
* `rendererAvailChannels`: Send an event from renderer to main. (`mainWindow.webContents.send('channelName')`)
|
||||
- `mainAvailChannels`: Send an event from main to renderer. (`window.mainApi.send('channelName'')`)
|
||||
- `rendererAvailChannels`: Send an event from renderer to main. (`mainWindow.webContents.send('channelName')`)
|
||||
|
||||
When sending events from renderer to main, you access the `window.mainApi` object instead of `ipcRenderer.send`. The `mainApi` is the name you set in your Vutron template and can be changed.
|
||||
|
||||
Here are the supported functions for mainApi: (To change and modify this, you need to modify `exposeInMainWorld` in `src/preload/index.ts`).
|
||||
|
||||
* `send`: Send an event to main.
|
||||
* `receive`: A listener to receive events sent by main.
|
||||
* `invoke`: Functions that can send events to main and receive data asynchronously.
|
||||
- `send`: Send an event to main.
|
||||
- `receive`: A listener to receive events sent by main.
|
||||
- `invoke`: Functions that can send events to main and receive data asynchronously.
|
||||
@@ -10,12 +10,13 @@ order: 3
|
||||
## General
|
||||
|
||||
| Script Name | Description |
|
||||
| --- | --- |
|
||||
|-------------------|---------------------------------------------------------------------------------------------------------|
|
||||
| `dev` | Start Electron as a development environment |
|
||||
| `dev:debug` | Start Electron as a development environment (with vite debug) |
|
||||
| `dev:debug:force` | Start Electron as a development environment (with vite debug + clean vite cache) |
|
||||
| `build` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
|
||||
| `build:pre` | Commands commonly run at build time. This script does not need to be run separately. |
|
||||
| `build` | Build the package for the current operating system. |
|
||||
| `build:all` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
|
||||
| `build:dir` | `electron-builder` directory build |
|
||||
| `build:mac` | Build preconfigured packages for macOS |
|
||||
| `build:linux` | Build preconfigured packages for Linux |
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"dev": "cross-env ELECTRON_ENABLE_LOGGING=true vite",
|
||||
"dev:debug": "vite -d",
|
||||
"dev:debug:force": "vite -d --force",
|
||||
"build": "npm run build:pre && electron-builder --config=buildAssets/builder/config.ts",
|
||||
"build:pre": "npm run format:fix && vue-tsc --noEmit && vite build",
|
||||
"build:all": "npm run build:pre && electron-builder --config=buildAssets/builder/config.ts -wml",
|
||||
"build:dir": "npm run build:pre && electron-builder --config=buildAssets/builder/config.ts --dir",
|
||||
|
||||
Reference in new issue
Block a user