@uxland/create-harmonix-plugin
v1.0.1
Published
Create a Harmonix plugin with React, Lit or Angular, running in the Harmonix demo shell: npm create @uxland/harmonix-plugin.
Readme
@uxland/create-harmonix-plugin
Create a Harmonix plugin with React, Lit or Angular, ready to run inside the Harmonix demo shell (@uxland/harmonix-demo-shell).
npm create @uxland/harmonix-plugin@latest my-plugin -- --template react
cd my-plugin
npm install
npm run dev # the demo shell with your plugin
npm run build # only the plugin, in dist/index.js--template can be react, lit or angular. Without arguments it asks for the folder and the framework. The folder name becomes the package name and the plugin id.
Use @latest: without it, npm may reuse an older version of the creator that it already has in its cache.
What you get
| | React and Lit | Angular |
| --- | --- | --- |
| The plugin: initialize and dispose | src/plugin.ts | projects/my-plugin/src/plugin.ts |
| Its main view | src/views/ | projects/my-plugin/src/views/ |
| Starts the demo shell with the plugin (development only) | src/sandbox.ts | src/sandbox.ts |
| Build | vite.config.ts | angular.json and vite.config.ts |
| Dev server | http://localhost:5173 | http://localhost:4200 |
The plugin registers a view in the main region and an item in the side menu that activates it. The view shows how plugins talk to each other through the broker.
npm run build outputs a single ES module, dist/index.js, with the framework and the shell left out: the application that loads the plugin provides them.
Requires Node.js 20.19 or later.
