Skip to content

Start here: I write a plugin

Audience: people who ship a language, a notation or a tool as a struktJS plugin · ~2 min read

A plugin is a folder under plugins/ with one or more languages, their concepts and, if you want, sample models. You do not need to know the engine. Do the setup once, then read these in order.

  1. Setup and workflow: get a working build and the fast edit-and-refresh loop.
  2. Tutorial: a todo language: a 45-minute, run-every-step build of a small language from concepts to a packaged sample.
  3. Language authoring guide, then Concepts: the model, and every field a concept can declare.
  4. The aspect you need: Editors and projections, Evaluation and generation, Checks, constraints and types, Scope and dataflow.
  5. Plugins and devkits: folder layout, how a plugin is found, devkits that bundle several languages, and hot-reloaded dev plugins.

Going further

  • Another file syntax for models: Persistence grammars.
  • Reusable pieces other plugins can share: Reusable kits.
  • A white-labeled IDE built from your plugins: Customer builds.
  • Changing the workbench itself rather than a plugin: Developer guide, path 1.
  • Checking your concepts before you commit: npm run lint:concepts -- <plugin> scans one plugin's concept files.
  • Not writing code? The Language Editor builds a language in the app, and Start here: I build languages is the user-side path.