A TypeScript-first Blockbench plugin template with ESBuild, Svelte, and plugin packaging utilities preconfigured.
- TypeScript 5 +
blockbench-types - ESBuild bundling with watch/dev and production modes
- Svelte support via
svelte-patching-tools+esbuild-plugin-svelte - Blockbench patch workflow via
blockbench-patch-manager - YAML language file loading (
src/lang/*.yml) through build plugins - ESLint (TypeScript + Svelte) and Prettier
- Vitest config (tests expected in
src/tests) - A pluginPackage build step that generates all of the necessary files for publishing a plugin to the Blockbench plugin repository.
- Use this template to create your repository.
- Install dependencies:
bun install
- Update plugin metadata in
package.json(name,title,author, versions, tags). - Edit plugin registration and lifecycle in
src/index.ts. - Rename your global plugin type in
src/global.d.tsto match your plugin name.
bun dev- Development build with file watchingbun build- Production buildbun test- Run testsbun format- Format all files with Prettier
- Main bundle:
dist/<package.name>.js - Plugin Package:
dist/pluginPackage/<package.name>.bbpack - Production metadata:
dist/meta.json
- The plugin is registered from
src/plugin.tsand has a global object onwindow[PACKAGE.name]for inter-plugin integrations. - The build uses environment defines (
process.env.*) and defaultsFLAVOR=localwhen not set.