pack: add build for current os only

This commit is contained in:
leejooy96 committed 2023-10-12 09:39:31 +09:00
1 parent 8d4375f3ad
commit 2aae3127d4
3 files changed
+23 -21

No files matched your search

+5 -5
View File
@@ -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. 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'')`) - `mainAvailChannels`: Send an event from main to renderer. (`window.mainApi.send('channelName'')`)
* `rendererAvailChannels`: Send an event from renderer to main. (`mainWindow.webContents.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. 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`). 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. - `send`: Send an event to main.
* `receive`: A listener to receive events sent by main. - `receive`: A listener to receive events sent by main.
* `invoke`: Functions that can send events to main and receive data asynchronously. - `invoke`: Functions that can send events to main and receive data asynchronously.
+17 -16
View File
@@ -9,22 +9,23 @@ order: 3
## General ## General
| Script Name | Description | | Script Name | Description |
| --- | --- | |-------------------|---------------------------------------------------------------------------------------------------------|
| `dev` | Start Electron as a development environment | | `dev` | Start Electron as a development environment |
| `dev:debug` | Start Electron as a development environment (with vite debug) | | `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) | | `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: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:dir` | `electron-builder` directory build | | `build:all` | Build a specified package for the entire operating system (Requires cross-platform build configuration) |
| `build:mac` | Build preconfigured packages for macOS | | `build:dir` | `electron-builder` directory build |
| `build:linux` | Build preconfigured packages for Linux | | `build:mac` | Build preconfigured packages for macOS |
| `build:win` | Build preconfigured packages for Windows | | `build:linux` | Build preconfigured packages for Linux |
| `lint` | ESLint code inspection. It does not modify the code. | | `build:win` | Build preconfigured packages for Windows |
| `lint:fix` | ESLint code inspection. Use auto-fix to fix your code. | | `lint` | ESLint code inspection. It does not modify the code. |
| `format` | Prettier code inspection. It does not modify the code. | | `lint:fix` | ESLint code inspection. Use auto-fix to fix your code. |
| `format:fix` | Prettier code inspection. Use auto-fix to fix your code. | | `format` | Prettier code inspection. It does not modify the code. |
| `test` | Build a package for testing and run tests against the test specification file. | | `format:fix` | Prettier code inspection. Use auto-fix to fix your code. |
| `test` | Build a package for testing and run tests against the test specification file. |
## For Documentation ## For Documentation
+1
View File
@@ -18,6 +18,7 @@
"dev": "cross-env ELECTRON_ENABLE_LOGGING=true vite", "dev": "cross-env ELECTRON_ENABLE_LOGGING=true vite",
"dev:debug": "vite -d", "dev:debug": "vite -d",
"dev:debug:force": "vite -d --force", "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: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: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", "build:dir": "npm run build:pre && electron-builder --config=buildAssets/builder/config.ts --dir",