@beaver-notes/plugin-builder
v1.1.0
Published
CLI and programmatic API to build and package Beaver Notes plugins into .beax files
Maintainers
Readme
@beaver-notes/plugin-builder
CLI and programmatic API to build and package Beaver Notes plugins into .beax files.
npm i -D @beaver-notes/plugin-builderCLI
beaver-plugin validate # Check manifest.json
beaver-plugin build # Compile TypeScript to dist/
beaver-plugin pack # Zip into .beax
beaver-plugin package # build + pack
beaver-plugin build -w # Watch mode
beaver-plugin package -i # Build + pack + install to app plugins dirProgrammatic API
import { build, pack, validate, packagePlugin } from '@beaver-notes/plugin-builder';
await build('/path/to/plugin', { outDir: 'dist', watch: false });
await pack('/path/to/plugin', { outDir: 'dist', install: true });
const result = validate('/path/to/plugin');Using npm Dependencies
Your plugin can use npm packages. Install them in your plugin project and esbuild will bundle them automatically:
npm install some-libimport { doThing } from 'some-lib';
export function setup(beaverNotes) { doThing(); }Only the code you actually import gets included in the .beax.
Manifest Reference
| Field | Required | Description |
|---|---|---|
| id | Yes | Reverse-domain identifier |
| name | Yes | Display name |
| version | Yes | SemVer |
| planes | Yes | ["app"], ["editor"], or ["app", "editor"] |
| permissions | Yes | Array of permission strings |
| main | Yes | Entry file relative to project root |
| author | No | Author name |
| description | No | Short description |
| icon | No | RemixIcon name |
| minAppVersion | No | Minimum app version |
| isDesktopOnly | No | Boolean |
| settings | No | JSON schema for auto-generated settings form |
| settingsFile | No | Code-based settings file path |
License
MIT
