Example Acode plugin that uses Preact for its page UI.
Use this when your plugin needs a custom page. For a blank language starter, use the official TypeScript or JavaScript templates instead.
Read the plugin docs before you start.
- Mounting Preact onto Acode's
$page - Theme-aware CSS with Acode variables
- Calling
toastandpushNotificationfrom a component - A command-palette entry that opens the page
- Cleaning up the tree, styles, and command on unmount
src/main.ts plugin init / unmount
src/ui/App.tsx page UI
src/ui/mount.tsx render / unmount helpers
src/ui/styles.css theme-aware styles
npm install
npm run dev # watch, serve on :3000, rebuild plugin.zip
npm run typecheck
npm run build # typecheck, bundle, write plugin.zipIn Acode, install from Plugins → + → Remote using:
http://<your-ip>:3000/plugin.zip
Open the page from the plugin list, or from the command palette (Open Preact Example).