Development
Running from source, the repository layout and conventions, tests, the desktop app, releases and the docs site.
How to run scmJS from source, how it is tested, built and released, and what to know before changing it. This is for contributors, and for anyone building the desktop app or the container image themselves.
Each topic is written down in one place:
| Topic | Where |
|---|---|
| What the editor does, for map makers | guide.md; the README is the short version |
| Installing the editor | installing.md |
| What happens to a map file on open and save | file-formats.md |
| The scenario format, section by section | chk-format.md |
| Triggers, conditions and actions | triggers.md |
| TrigScript, the trigger scripting language | trigscript.md, trigscript-language.md for the language of programs, and trigscript-library.md for its standard library; the compiler is in the TrigScript plugin's repository |
| Where the graphics come from, data sets, how they are drawn | game-data.md |
The scmjs command line |
cli.md |
The @scm-js/core library |
core.md |
| Using and writing plugins, the plugin API | plugins.md, and the reference at docs.scmjs.dev/api |
| Each plugin's internals | its own repository's README |
| Running, building, releasing, contributing | this file |
| Per-area design notes for working on the code | .claude/internals/*.md, indexed by CLAUDE.md |
| Provenance of adapted code and data | ATTRIBUTION.md |
| Release notes | docs/releases/ |
The design notes under .claude/internals/ are one file per area of the code (terrain,
saving, the plugin host, sync, …). They record why the code is the way it is, and the
traps that are not visible from the code. Read the note for an area before changing it.
- Getting startedYou need Node.js 22.18 or newer (the extraction scripts import TypeScript directly through Node's type stripping) and git.
- Commandsnpm run build is the type-check: tsc -b covers the app, the scripts and the desktop main process, the command line, the library's entry and the bot types (tsconfig.app.json…
- Repository layoutWhat each folder and file at the top of the repository holds.
- ConventionsThese are the rules everything else follows. The design notes in .claude/internals/ give the reasons, and the source comments say more.
- The plugin hostplugins.md is written for someone who has the npm package and none of this repository.
- TestsTests are tests/*.test.ts (and any src/**/*.test.ts), run by vitest in Node with no browser.
- TranslationsThe editor's own words can be shown in another language; a map's text is never translated.
- Desktopdesktop/ is an Electron shell around the same web bundle.
- Releases and hosting.github/workflows/build.yml has three channels.
- Docs site and screenshotsdocs.scmjs.dev is built by npm run build:docs. The guides are the sixteen docs/*.md files, split at their ## headings into pages, with the ### beneath as each page's contents.
- ContributingThe rules a pull request is held to — what may not go into git, keeping the documents current, translations, the plugin API, credit for adapted code…