Skip to content

Beaver-Notes/beavernotes-plugin-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@beaver-notes/plugin-builder

CLI and programmatic API to build and package Beaver Notes plugins into .beax files.

npm i -D @beaver-notes/plugin-builder

CLI

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 dir

Programmatic 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-lib
import { 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

About

Build and package Beaver Notes plugins into .beax files

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors