Enhance README.md for adapter-electron with detailed features and integration notes

- Updated the description to highlight native protocol handling and Vite integration.
- Added key features of the adapter, including development integration and production readiness.
- Clarified example app usage and provided detailed setup instructions for better user guidance.
This commit is contained in:
Luke Hagar
2025-07-23 16:48:35 -05:00
parent 7174ad6c54
commit 197a2e3f1d

View File

@@ -14,10 +14,16 @@ I have tested and validated the implementation with the node20 runtime. Other ru
[Adapter](https://github.com/LukeHagar/sveltekit-adapters/tree/main/packages/adapter-electron) | [Example](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/electron) [Adapter](https://github.com/LukeHagar/sveltekit-adapters/tree/main/packages/adapter-electron) | [Example](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/electron)
Deploy SvelteKit applications as electron desktop applications. Deploy SvelteKit applications as Electron desktop applications with native protocol handling.
This adapter does require additional files to be added to the project, and requires the use of the package `electron-vite` to properly handle the electron implementation. This adapter provides seamless integration between SvelteKit and Electron, featuring:
Please look at the [example](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/electron) implementation for more information. - **Native Protocol Handling**: Uses Electron's `protocol.handle()` API for production
- **Development Integration**: Seamless Vite dev server integration with hot module replacement
- **Full SvelteKit Support**: SSR, API routes, static assets, prerendered pages, and form actions
- **Clean Architecture**: All Electron integration code is encapsulated
- **Production Ready**: Works with electron-builder and similar packaging tools
The adapter automatically handles the build process and provides helper functions for setting up the Electron main process. Please look at the [example](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/electron) implementation for detailed setup instructions.
## What's inside? ## What's inside?
@@ -26,9 +32,9 @@ This repo includes the following packages and examples:
### Examples ### Examples
- `appwrite`: a [SvelteKit](https://kit.svelte.dev) example app that uses the `adapter-appwrite` adapter [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/appwrite)] - `appwrite`: a [SvelteKit](https://kit.svelte.dev) example app that uses the `adapter-appwrite` adapter [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/appwrite)]
- `electron`: a [SvelteKit](https://kit.svelte.dev) example app that uses the `adapter-electron` adapter [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/electron)] - `electron`: a [SvelteKit](https://kit.svelte.dev) example app that uses the `adapter-electron` adapter with native protocol handling [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/examples/electron)]
### Packages ### Packages
- `adapter-appwrite`: a [SvelteKit](https://kit.svelte.dev) adapter for deploying applications as appwrite functions [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/packages/adapter-appwrite)] - `adapter-appwrite`: a [SvelteKit](https://kit.svelte.dev) adapter for deploying applications as appwrite functions [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/packages/adapter-appwrite)]
- `adapter-electron`: a [SvelteKit](https://kit.svelte.dev) adapter for deploying applications as electron desktop applications [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/packages/adapter-electron)] - `adapter-electron`: a [SvelteKit](https://kit.svelte.dev) adapter for deploying applications as Electron desktop applications with native protocol handling and Vite integration [[Link](https://github.com/LukeHagar/sveltekit-adapters/tree/main/packages/adapter-electron)]