Docs

Project Structure

Sliprail only requires a valid manifest and the files referenced by that manifest. Your source layout can vary, but the directory loaded by Sliprail must contain the runtime output.

Minimal Runtime Structure

my-extension/
├── manifest.json
├── main.mjs
├── icon.svg
└── README.md

A TypeScript project commonly keeps source and build output together during development:

my-extension/
├── src/
│   └── main.ts
├── main.mjs
├── manifest.json
├── icon.svg
├── package.json
└── node_modules/

node_modules is a development dependency directory. Sliprail does not install it for users, so published runtime code must not depend on an unbundled local node_modules directory.

The manifest.json File

An extension manifest requires id, displayName, description, and main.

{
  "id": "your-registered-extension-id",
  "displayName": "My Extension",
  "description": "A short description of the extension",
  "main": "main.mjs",
  "icon": "icon.svg"
}
  • id must be the identifier registered in the Developer Portal
  • displayName and description accept a string or a language map
  • main is relative to the manifest directory and must reference an existing JavaScript module
  • icon is optional and may reference a local file, HTTP URL, or data URI
  • type may be omitted for an extension. Themes must set type to Theme

Dependency Management

Sliprail does not run npm install for an extension.

  • Use Node.js built-in modules directly when possible
  • Import @sliprail/sdk declarations with import type
  • Bundle third-party runtime dependencies into the generated JavaScript
  • Include every file referenced by manifest.json in the repository or package you distribute