Once your extension is developed and tested, you can publish it for others to use. The publishing process is primarily for public extensions and is managed through GitHub.
Sliprail extensions are recommended to be developed using pure JavaScript or ES modules (.js or .mjs files). The advantages of using pure JavaScript include:
If your extension uses TypeScript or other languages that require compilation, you can configure your own build process as needed.
Important Reminder: Extension code runs in Sliprail's main thread. Please ensure your extension code does not block the main thread for extended periods.
async/await or Promises for I/O operationssetImmediate/setTimeout for chunked processingBlocking the main thread may cause the Sliprail interface to become laggy, slow to respond, and negatively impact user experience.
If your extension only uses Node.js built-in modules and APIs provided by @sliprail/sdk, no additional build or bundling steps are required.
If your extension relies on third-party npm packages, please note:
node_modules directoryWhen publishing a new version, make sure the code pushed to GitHub includes all bundled files.
The process for publishing a public extension is straightforward:
Prepare Your Code: Ensure all required files (manifest.json, extension code, icons, etc.) are ready
Push to GitHub: Push your code to the GitHub repository you specified when registering your extension
Automatic Deployment: Sliprail periodically checks registered extension repositories for updates. When it detects an update, it will automatically pull the latest version
Users will then be able to update to the latest version of your extension in the Sliprail Extension Manager.
Private extensions do not need to be published to any platform. They run directly on your machine via the "Load Local Extension" feature. You just need to ensure your code is saved locally.