This repo contains the extensions used by Unsandboxed.
If you are new here, start with the quick setup below.
- Install packages:
npm install
- Build the extensions:
npm run build
- Start the local dev server:
npm run dev
Extensions will be hosted at the URL:
http://localhost:8001/
That is enough to begin editing and testing extensions.
npm run dev- run local servernpm run build- build library intodist/main.jsnpm test- run tests
src/extensions/- extension source folderssrc/template/- starter files for a new extensionsrc/index.js- loads extension code, manifests, and iconssrc/extensions.json- generated extension ID map (auto-generated)dist/main.js- build outputdevelopment/server.js- local development server
Each extension folder should have:
index.jsmanifest.json
Recommended:
icon.svg(main thumbnail)insetIcon.svg(small icon shown on card)
Your manifest.json should include at least:
id(must be unique)namedescriptioninsetIconColor(hex color, for UI tinting)
This repo supports TurboWarp-style extension files that look like this:
- wrapped in an IIFE:
(function (Scratch) { ... })(Scratch) - registering with:
Scratch.extensions.register(new MyExtension())
During build, webpack rewrites these so they work like normal modules:
- the IIFE wrapper is removed
Scratch.extensions.register(new MyExtension())is rewritten tomodule.exports = MyExtension
Why this matters:
- you can keep writing normal TurboWarp-style extension code
- this repo can still import and bundle each extension as a module
-
Do not manually edit
src/extensions.json.- It is regenerated automatically during build.
-
If your extension does not have an
icon.svg, a fallback thumbnail is used and tinted withinsetIconColor. -
If your extension is missing from the gallery, check:
manifest.jsonexistsmanifest.idis unique- build output has no duplicate ID warning
-
Broken icon in gallery:
- check that SVG/PNG is valid
- rebuild (
npm run build) - hard refresh browser cache
-
Extension not loading:
- confirm
manifest.idmatches what you expect - confirm your folder has
index.js
- confirm
Currently not accepting or reviewing new third-party extensions.
See LICENSE.