Mod
Browse the docs · Packages
docs / extending · distribution

Packages

A package is how anything is added to Mod: an app, a record type, a tool, a skill or a harness. It is an ordinary package with a mod field that says what it adds and what it may touch.

Mod decides

  • A package declares what it reads and writes, and gets only that.
  • A package is installed in a project or in the whole World.
  • Records belong to the project, not the package. Removing a package never deletes the records it made.

You decide

  • What your package adds.
  • Where to install it, and whether to publish it for others. publishing soon
<span class="c">// package.json: an app is a package with a "mod" field</span>
"mod": {
  "name": "Launch plan",
  "dataType": "launchplan",
  "reads": ["tasks"], "writes": ["tasks"],
  "entry": "dist/app.js"
}