Skip to content

Feature switches

There is one edition of Developer Assistance Tools. Some tools are grouped into removable feature modules, and a build can leave any of them out. This is how a smaller build, with a smaller audit surface, is produced for a particular deployment.

features.json at the repository root has two parts:

  • disabled: a list of feature names to leave out. It is empty by default.
  • features: the available modules, each with a title, a summary, the pages it owns and the files (scripts, styles and vendored libraries) only it uses.
Key Title Pages removed
sql SQL Workspace and Schema Designer tools/data/sql.html, tools/data/schema.html
api API toolkit (OpenAPI and Swagger viewer, HTTP header reference, test payload builder) tools/api/swagger.html, tools/api/http-headers.html, tools/data/payloads.html
documents Documents and media (PDF tools, compressor, image editor, SVG tools, CSV editor) tools/media/pdf-tools.html, tools/media/compress.html, tools/media/image-editor.html, tools/media/svg-tools.html, tools/data/csv.html
code Code playgrounds (JavaScript playground, HTML viewer) tools/dev/editor.html, tools/dev/html-viewer.html
operations Operations toolkit (log analyser, deployment manifest builder, command reference) tools/data/log-analyzer.html, tools/dev/deploy-manifest.html, tools/text/reference.html
diagrams Diagrams and whiteboard tools/diagrams/diagrams.html, tools/diagrams/whiteboard.html
ai AI features (prompt workbench) tools/dev/ai-tools.html

When a feature is disabled, the build strips its pages, the vendored libraries only it uses, its catalogue entries and its redirects. Libraries that more than one feature loads (pdf-lib, fontkit and unifont, used by both documents and operations) are not listed under any feature and ship in every build.

  1. Add the feature names to disabled in features.json:

    "disabled": ["ai", "diagrams"],
  2. Rebuild the site:

    Terminal window
    node scripts/build/build-pages.mjs

    The build writes into dist/. A self-hosted release built with node scripts/build/build-container.mjs also reads features.json, so edit it before building the release; see Self-hosting.

  3. To bring a feature back, delete its name from disabled and rebuild.

The switches apply at build time only. They do not change a site that has already been built.