Make Electron build
I historically have never liked Electron, and I don't like it now, but unfortunately due to poor browser support, I don't have a choice to ship anything more lightweight if I want to use the Filesystem API as part of the packaged build, which is kind of the point. I guess it's true: "You either die a hero or you live long enough to become the villain." This is an experimental build.
This commit is contained in:
20
README.md
20
README.md
@@ -109,6 +109,11 @@ tests/
|
||||
playwright.config.js
|
||||
run-e2e.sh
|
||||
|
||||
electron/
|
||||
main.js # Electron main process (local HTTP server + BrowserWindow)
|
||||
package.json # electron, electron-builder, build config
|
||||
dist/ # Copied web/dist/ + packaged installers (gitignored)
|
||||
|
||||
# Root scripts
|
||||
test.sh # Runs all tests (WASM + E2E)
|
||||
serve-locally.sh # Serves app at localhost:8888
|
||||
@@ -201,6 +206,21 @@ To automatically rebuild when source files change:
|
||||
./serve-locally.sh --dev
|
||||
```
|
||||
|
||||
## Building the Electron app
|
||||
|
||||
A standalone desktop app can be built from the `electron/` directory. It packages the built `web/dist/` output into an Electron shell with a local HTTP server (avoids `file://` limitations).
|
||||
|
||||
```bash
|
||||
cd electron
|
||||
npm install
|
||||
npm run build:linux # Linux AppImage
|
||||
npm run build:mac # macOS DMG
|
||||
npm run build:win # Windows NSIS installer
|
||||
npm run build # all platforms
|
||||
```
|
||||
|
||||
Each platform script first copies `web/dist/` into `electron/dist/`, then runs electron-builder. Output goes to `electron/dist/`.
|
||||
|
||||
## Testing
|
||||
|
||||
Run all tests (WASM integration + E2E):
|
||||
|
||||
Reference in New Issue
Block a user