mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 05:32:06 +00:00
2.0 KiB
2.0 KiB
scoreko-electron-dev
Electron wrapper to package a NodeCG installation that includes the scoreko-dev bundle, inspired by opeik/runback-electron but updated to modern Electron + TypeScript.
Key requirements
- Node
>=22(.nvmrcincluded). - Electron pinned to
39.5.1.
What it does
- Starts
lib/nodecg/index.jsas a child process from Electron. - Shows the bundle loading dashboard route (
/bundles/<bundle>/dashboard/loading.html) served by NodeCG while it starts. - Loads the bundle dashboard at
http://localhost:<port>/bundles/<bundle>/<dashboard-route>. - Packages NodeCG + assets inside the final app with
electron-builder.
Expected structure
scoreko-electron-dev/
├─ lib/
│ └─ nodecg/
│ ├─ index.js
│ ├─ node_modules/
│ └─ bundles/
│ └─ scoreko-dev/
├─ src/main/main.ts
├─ static/icons/
└─ package.json
Scripts
npm run dev: development mode.npm run build: compile TypeScript and copy assets.npm run start: build and local run.npm run test: build + unit tests (node:test).npm run doctor: configuration/environment preflight (lib/nodecg, permissions, port, and env vars).npm run lint: minimal quality rules with ESLint.npm run format: format validation with Prettier.npm run pack: generate app without installer.npm run dist: generate installer.
Environment variables
The single source of truth for defaults is in .env.example.
- Copy
.env.exampleto.env(or export variables in your shell/CI). - Adjust only what you need.
- Run
npm run doctorto validate configuration before starting.
Cross-platform build (icons)
build.win.icon:static/icons/icon.icobuild.linux.icon:static/iconsbuild.mac.icon:static/icons/icon.icns
The
.icnsis referenced in build config and must exist locally to package macOS.
Troubleshooting and architecture
- Troubleshooting guide:
docs/troubleshooting.md - Architecture map:
docs/architecture.md - Roadmap:
docs/refactor-roadmap.md