nuxt-electron
Advanced tools
Comparing version 0.4.5 to 0.5.0
@@ -1,5 +0,24 @@ | ||
import { type Configuration } from 'vite-electron-plugin'; | ||
import { NuxtModule } from '@nuxt/schema'; | ||
export interface ElectronOptions extends Partial<Configuration> { | ||
export interface ElectronOptions { | ||
/** | ||
* `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc. | ||
* | ||
* @example | ||
* | ||
* ```js | ||
* export default defineNuxtConfig({ | ||
* modules: ['nuxt-electron'], | ||
* electron: { | ||
* build: [ | ||
* { | ||
* // Main-Process entry file of the Electron App. | ||
* entry: 'electron/main.ts', | ||
* }, | ||
* ], | ||
* }, | ||
* }) | ||
* ``` | ||
*/ | ||
build: import('vite-plugin-electron').Configuration[]; | ||
/** | ||
* @see https://github.com/electron-vite/vite-plugin-electron-renderer | ||
@@ -11,2 +30,4 @@ */ | ||
* | ||
* @defaultValue | ||
* | ||
* ```js | ||
@@ -13,0 +34,0 @@ * export default defineNuxtConfig({ |
{ | ||
"name": "nuxt-electron", | ||
"version": "0.4.5", | ||
"version": "0.5.0", | ||
"description": "Nuxt Integration with Electron", | ||
@@ -28,10 +28,6 @@ "main": "./dist/index.cjs", | ||
"peerDependencies": { | ||
"esbuild": "*", | ||
"vite-electron-plugin": "*", | ||
"vite-plugin-electron": "*", | ||
"vite-plugin-electron-renderer": "*" | ||
}, | ||
"peerDependenciesMeta": { | ||
"esbuild": { | ||
"optional": true | ||
}, | ||
"vite-plugin-electron-renderer": { | ||
@@ -44,7 +40,8 @@ "optional": true | ||
"esbuild": "^0.17.14", | ||
"electron": "^24.3.1", | ||
"nuxt": "^3.2.2", | ||
"typescript": "^4.9.5", | ||
"vite": "^4.1.4", | ||
"vite-electron-plugin": "latest", | ||
"vite-plugin-electron-renderer": "latest" | ||
"vite-plugin-electron": "^0.11.2", | ||
"vite-plugin-electron-renderer": "^0.14.4" | ||
}, | ||
@@ -51,0 +48,0 @@ "files": [ |
@@ -15,5 +15,5 @@ <p align="center"> | ||
- 🚀 High-performance <sub><sup>(Not Bundle, based on esbuild)</sup></sub> | ||
- 📦 Out of the box | ||
- 🔥 Hot restart | ||
- 🔥 Hot restart <sub><sup>(Main process)</sup></sub> | ||
- 🚀 Hot reload <sub><sup>(Preload script)</sup></sub> | ||
@@ -26,9 +26,9 @@ ## Quick Setup | ||
# Using pnpm | ||
pnpm add -D nuxt-electron vite-electron-plugin vite-plugin-electron-renderer electron electron-builder | ||
pnpm add -D nuxt-electron vite-plugin-electron vite-plugin-electron-renderer electron electron-builder | ||
# Using yarn | ||
yarn add --dev nuxt-electron vite-electron-plugin vite-plugin-electron-renderer electron electron-builder | ||
yarn add --dev nuxt-electron vite-plugin-electron vite-plugin-electron-renderer electron electron-builder | ||
# Using npm | ||
npm install --save-dev nuxt-electron vite-electron-plugin vite-plugin-electron-renderer electron electron-builder | ||
npm install --save-dev nuxt-electron vite-plugin-electron vite-plugin-electron-renderer electron electron-builder | ||
``` | ||
@@ -40,5 +40,11 @@ | ||
export default defineNuxtConfig({ | ||
modules: [ | ||
'nuxt-electron', | ||
], | ||
modules: ['nuxt-electron'], | ||
electron: { | ||
build: [ | ||
{ | ||
// Main-Process entry file of the Electron App. | ||
entry: 'electron/main.ts', | ||
}, | ||
], | ||
}, | ||
}) | ||
@@ -69,25 +75,27 @@ ``` | ||
Here is the default `electron` options | ||
> This is based on the `vite-plugin-electron`, see the **[Documents](https://github.com/electron-vite/vite-plugin-electron)** for more detailed options | ||
```ts | ||
export default defineNuxtConfig({ | ||
modules: [ | ||
'nuxt-electron', | ||
], | ||
electron: { | ||
include: ['electron'], | ||
outDir: 'dist-electron', | ||
}, | ||
}) | ||
``` | ||
Full types definition | ||
> This is based on the `vite-electron-plugin`, see the **[Documents](https://github.com/electron-vite/vite-electron-plugin#configuration)** for more detailed options | ||
```ts | ||
import type { Configuration } from 'vite-electron-plugin' | ||
export interface ElectronOptions extends Partial<Configuration> { | ||
export interface ElectronOptions { | ||
/** | ||
* `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc. | ||
* | ||
* @example | ||
* | ||
* ```js | ||
* export default defineNuxtConfig({ | ||
* modules: ['nuxt-electron'], | ||
* electron: { | ||
* build: [ | ||
* { | ||
* // Main-Process entry file of the Electron App. | ||
* entry: 'electron/main.ts', | ||
* }, | ||
* ], | ||
* }, | ||
* }) | ||
* ``` | ||
*/ | ||
build: import('vite-plugin-electron').Configuration[], | ||
/** | ||
* @see https://github.com/electron-vite/vite-plugin-electron-renderer | ||
@@ -99,2 +107,4 @@ */ | ||
* | ||
* @defaultValue | ||
* | ||
* ```js | ||
@@ -158,1 +168,5 @@ * export default defineNuxtConfig({ | ||
[license-href]: https://npmjs.com/package/nuxt-electron | ||
## TODO | ||
- [ ] write test |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
17631
2
326
167
2
8