Skip to content

Build, package, and distribute

Run the packager against your plugin directory. It uses the public SDK without rebuilding FluxPlugs for each plugin.

Terminal window
pnpm --filter @fluxplugs/plugin-tools... build
node packages/plugin-tools/cli.mjs build /absolute/path/to/your-plugin
node packages/plugin-tools/cli.mjs pack /absolute/path/to/your-plugin

Build bundles src/index.ts and updates integrity.sha256 in fluxplug.json. Pack builds first, then writes releases/<plugin-id>-<version>.zip containing only the manifest and its built entry. Publication of the local archive is atomic. Filename-unsafe version characters become underscores.

After building, run pnpm pack in each of packages/schemas, packages/plugin-api, and packages/plugin-tools. Install those matching local tarballs together as development dependencies in your external project. They are currently version 2.0.0-beta.1.

Then run pnpm exec fluxplug build . or pnpm exec fluxplug pack .. The starter also defines pnpm pack:plugin. Do not assume the packages are available from a public registry.

The executable is one classic browser IIFE, not an ES module. Imported CSS and HTML become strings; PNG/JPEG/WebP imports become data URLs. No dependency on another runtime file may remain. The executable ceiling is 2 MiB.

Append styles to your own sandbox document. Remote images use the image API; bundling does not relax host image policies.

Share the resulting ZIP. Users import it directly in Fluxer. Alternatively share fluxplug.json with the entry at its declared relative path.

Keep the plugin ID stable, increment your plugin version, and rebuild whenever code changes. Reimport preserves compatible settings and storage but clears enabled/trust state.

Manual ZIPs may contain a root manifest or one enclosing folder. Multi-plugin archives, encrypted archives, links, ambiguous names, and unsafe paths are rejected. Use the pack command to avoid shipping a source checkout. See import limits.