Update dependencies and scripts in adapter-electron for improved functionality

- Added `nodemon` and `wait-on` as dependencies in the electron example's package.json for better development experience.
- Updated the `dev` script to utilize `wait-on` for ensuring the Vite server is running before starting Electron.
- Enhanced the README.md with clearer instructions and examples for configuring the adapter and its options.
- Removed the `functions` option from the TypeScript definition to simplify the interface.
- Cleaned up unused imports in setupHandler.js to streamline the code.
This commit is contained in:
Luke Hagar
2025-07-23 23:24:00 -05:00
parent ef082c2acd
commit 19e195bc98
7 changed files with 394 additions and 118 deletions

View File

@@ -1,6 +1,5 @@
// adapter-electron.js
import { readFileSync, writeFileSync } from 'node:fs';
import fs from 'node:fs';
import path from 'node:path';
import { rollup, watch as rollupWatch } from 'rollup';
import { nodeResolve } from '@rollup/plugin-node-resolve';
@@ -159,6 +158,7 @@ export default function (opts = {}) {
/**
* Vite plugin to build Electron main/preload files using Rollup
* Usage: import { electronPlugin } from 'adapter-electron'
* @param {import('./index.d.ts').ElectronPluginOptions} options - Configuration options
*/
export function electronPlugin(options = {}) {
const {