mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 05:32:06 +00:00
54 lines
1.7 KiB
Markdown
54 lines
1.7 KiB
Markdown
# scoreko-electron
|
|
|
|
Desktop app (Electron + TypeScript) to run and package a NodeCG installation with the `scoreko-dev` bundle.
|
|
|
|
## 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 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 NodeCG native modules.
|
|
- `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`
|