Skip to main content
Two files describe an expansion: meta.json is who it is, config.json is how to run it. Neither contains code, and both are read before anything of yours runs. Every problem in them is reported at once, naming the file and the field, so you fix the list rather than one error per reload:

meta.json

meta.json
Unknown keys are kept out of the way with a warning rather than failing the load.

type

New in 2.2. "type" says what kind of expansion this is: Any other value is an error. "type": "library" is reserved, and refused with libraries ("type": "library") are not supported yet.

id and version, in practice

  • The id appears in the routes of your pages (custom/my_expansion.home) and prefixes everything you register, so two expansions can both have a home page.
  • Changing id after release means NMCrate sees a different expansion, and per-project state saved under the old id is no longer read.
  • version is what the store shows, what an update compares against, and what other expansions’ requires ranges are checked against.

requires

New in 2.1. Name the expansions yours needs, with the version range it works with:
meta.json
When your expansion starts, each required expansion is started first, so its services are ready when your start file runs. The field itself is checked with the rest of the manifest:
If a requirement cannot be met at start, your expansion does not start, and the Expansions page marks it Crashed with the reason:

config.json

config.json
A missing config.json is accepted with a warning and the defaults. Errors for background:
These keys are reserved, accepted with a warning and otherwise ignored today: settings, locales, build, main. (background was reserved in 2.0 and is real since 2.1.)

Compatibility

sdkVersion is checked against the SDK the app provides, 2.4.0:
  • satisfied: loads normally
  • not satisfied: does not load, and the Expansions page says
Each minor version only adds, so an expansion declaring ^2.0.0 keeps working. Declare the lowest version that has what you use: ^2.1.0 for most points, ^2.2.0 for apps, ^2.3.0 for tools, ^2.4.0 for project types. Prereleases only match a range that mentions one, as in npm.