Files
scoreko-electron-dev/README.md
T
2026-03-03 00:07:12 +01:00

55 lines
1.8 KiB
Markdown

# scoreko-electron
Desktop app (Electron + TypeScript) to run and package `scoreko-dev` (Electron host + NodeCG started inside `lib/scoreko-dev`).
## Requirements
- Node.js `>=24`
- Dependencies installed with `npm install`
## Available scripts
### Development
- `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.
### Build and distribution
- `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.
### Quality and diagnostics
- `npm run test`: build and tests (`node:test`).
- `npm run sanity`: runs `typecheck`, `lint`, and `test` as a quick pre-release gate.
- `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.
### Native modules
- `npm run rebuild:native`: rebuilds scoreko-dev native modules (including NodeCG dependency).
- `npm run rebuild:better-sqlite3`: rebuilds only `better-sqlite3` for Electron.
## Quick setup
1. Copy `.env.example` to `.env`.
2. Adjust variables for your environment.
3. Run `npm run doctor` before developing or packaging.
## References
- Troubleshooting: `docs/troubleshooting.md`
- Architecture: `docs/architecture.md`