Development
Building the editor and the desktop app, the release channels, and the repository layout.
Node.js 22.18 or newer. The unit extraction script imports TypeScript directly and depends on Node's built-in type stripping.
npm install
npm run extract # one-time: see docs/game-data.md
npm run dev # http://localhost:5173
npm run build # tsc -b (type-check) + vite build
npm run lint # oxlint
npm test # vitest run, node environment, ~2s
npm run build is the type-check; npm run lint does not type-check.
tsconfig.app.json sets noUnusedLocals, noUnusedParameters,
verbatimModuleSyntax (so import type) and erasableSyntaxOnly (so no enums and no
parameter properties).
- Desktop builddesktop/ is an Electron shell around the same web bundle: main.ts serves dist/ under app://scmjs/ and answers the game-data IPC (search the disk, extract, pick a folder), preload.ts expos…
- Releases.github/workflows/build.yml has three channels, and the release list only grows when a version is cut:
- Plugin typingsnpm run build:plugin-types (scripts/build-plugin-types.mjs) rolls the contract into one plugin-api/index.d.ts with dts-bundle-generator over src/plugins/api.ts, plus a package.json.
- TestsTests live in tests/*.test.ts, and src/**/*.test.ts is picked up too.
- Repository layoutState is all Jotai, with no context or provider layering beyond the default store.
- Dev deep-linksQuery params jump straight to a UI state, which is the fastest way to iterate on a screen.
- Startupsrc/services/preload.ts runs an ordered list of tasks that actually await the work the editor needs to be warm: the startup tileset, the unit tables, the GRPs a blank map draws, then the …
- Where things are documentedAll of it is published as docs.scmjs.dev, built by npm run build:docs (scripts/build-docs.mjs) and deployed by build.yml's docs job on a tag, like the hosted editor.