Files
sveltekit-adapters/packages/adapter-electron/index.d.ts
Luke Hagar 196fc9d774 chore: Update package dependencies and configuration for Electron adapter
- Removed package manager and engines from package.json.
- Updated pnpm-lock.yaml to reflect new versions of dependencies.
- Modified pnpm-workspace.yaml to include only built dependencies for Electron.
- Adjusted electron-builder.yaml to exclude unnecessary files and added output directory.
- Deleted obsolete electron.vite.config.ts file.
- Updated main entry point in examples/electron/package.json to use CommonJS format.
- Refactored scripts in examples/electron/package.json for better development experience.
- Enhanced error handling and logging in game logic within examples/electron/src/routes/sverdle/+page.server.ts.
- Updated adapter-electron to support new protocol handling and build processes.
2025-07-12 23:45:12 -05:00

50 lines
1.1 KiB
TypeScript

import type { Adapter } from '@sveltejs/kit';
export interface AdapterOptions {
/**
* Output directory for the Electron app
* @default 'out'
*/
out?: string;
/**
* Directory name for the protocol handler functions
* @default 'functions'
*/
functions?: string;
/**
* Whether to precompress static assets
* @default false
*/
precompress?: boolean;
}
/**
* SvelteKit adapter for Electron desktop apps
*
* This adapter:
* 1. Builds the SvelteKit app using the static adapter for client assets
* 2. Copies server files for SSR support
* 3. Copies prerendered pages
* 4. Provides a native Electron protocol handler that bypasses HTTP servers
* 5. Outputs a complete Electron app structure ready for packaging
*/
declare function adapter(options?: AdapterOptions): Adapter;
export default adapter;
export interface ElectronPluginOptions {
mainEntry?: string;
preloadEntry?: string;
mainOut?: string;
preloadOut?: string;
externalMain?: string[];
externalPreload?: string[];
}
/**
* Vite plugin to build Electron main/preload files
*/
export declare function electronPlugin(options?: ElectronPluginOptions): any;