docs: translate README to English and remove roadmap

This commit is contained in:
Pandipipas
2026-02-24 00:46:58 +01:00
parent ccea55ffa2
commit 83f898bde6
2 changed files with 36 additions and 242 deletions
+36 -47
View File
@@ -1,64 +1,53 @@
# 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.
Desktop app (Electron + TypeScript) to run and package a NodeCG installation with the `scoreko-dev` bundle.
## Key requirements
## Requirements
- Node `>=22` (`.nvmrc` included).
- Electron pinned to `39.5.1`.
- Node.js `>=22`
- Dependencies installed with `npm install`
## What it does
## Available scripts
- Starts `lib/nodecg/index.js` as 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`.
### Development
## Expected structure
- `npm run dev`: compiles in watch mode and opens Electron.
- `npm run watch`: TypeScript watch mode.
- `npm run dev:electron`: opens Electron when `dist/main/main.js` is ready.
- `npm run start`: full build and local run.
```text
scoreko-electron-dev/
├─ lib/
│ └─ nodecg/
│ ├─ index.js
│ ├─ node_modules/
│ └─ bundles/
│ └─ scoreko-dev/
├─ src/main/main.ts
├─ static/icons/
└─ package.json
```
### Build and distribution
## Scripts
- `npm run clean`: removes `dist` and `release`.
- `npm run typecheck`: validates types without emitting files.
- `npm run build`: compiles TypeScript and copies assets.
- `npm run pack`: generates the app without an installer (`electron-builder --dir`).
- `npm run dist:win`: builds a Windows installer.
- `npm run dist:linux`: builds a Linux AppImage.
- `npm run dist:mac`: builds a macOS package.
- `npm run dist:all`: builds artifacts for Windows, Linux, and macOS.
- `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.
### Quality and diagnostics
## Environment variables
- `npm run test`: build and tests (`node:test`).
- `npm run doctor`: environment/configuration diagnostics.
- `npm run lint`: lint with ESLint.
- `npm run lint:fix`: lint with auto-fix.
- `npm run format`: checks formatting with Prettier.
- `npm run format:write`: applies formatting with Prettier.
The **single source of truth for defaults** is in `.env.example`.
### Native modules
1. Copy `.env.example` to `.env` (or export variables in your shell/CI).
2. Adjust only what you need.
3. Run `npm run doctor` to validate configuration before starting.
- `npm run rebuild:native`: rebuilds NodeCG native modules.
- `npm run rebuild:better-sqlite3`: rebuilds only `better-sqlite3` for Electron.
## Cross-platform build (icons)
## Quick setup
- `build.win.icon`: `static/icons/icon.ico`
- `build.linux.icon`: `static/icons`
- `build.mac.icon`: `static/icons/icon.icns`
1. Copy `.env.example` to `.env`.
2. Adjust variables for your environment.
3. Run `npm run doctor` before developing or packaging.
> The `.icns` is referenced in build config and must exist locally to package macOS.
## References
## Troubleshooting and architecture
- Troubleshooting guide: `docs/troubleshooting.md`
- Architecture map: `docs/architecture.md`
- Roadmap: `docs/refactor-roadmap.md`
- Troubleshooting: `docs/troubleshooting.md`
- Architecture: `docs/architecture.md`