Skip to main content

@uxland/create-harmonix-plugin

npm

The plugin creator. It generates a plugin project with React, Lit or Angular that already works: a plugin that registers a view in the main region and an item in the side menu, running inside the demo shell. You use it once, to start a project; it is not a dependency of the project it creates.

Usage​

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

Use @latest: without it, npm may reuse an older version of the creator from its cache.

ArgumentDescription
<folder>The folder to create. It must not exist or must be empty. Its name, in lowercase with only letters, digits and hyphens, becomes the package name and the pluginId.
--template <name>, -t <name>react, lit or angular.
--help, -hPrints the usage.

Without arguments, in an interactive terminal, it asks for the folder and the framework.

When it creates the project, the creator looks up the latest @uxland/harmonix-demo-shell on npm and uses it if it is newer than the one in the template. It also warns if a newer version of the creator exists.

Templates​

ReactLitAngular
Plugin entry pointsrc/plugin.tssrc/plugin.tsprojects/my-plugin/src/plugin.ts
Dev serverhttp://localhost:5173http://localhost:5173http://localhost:4200
BuildViteViteng build and Vite
Extra dependenciesreact, react-dom 19, @uxland/harmonix-adapterslit 3Angular 20

All templates build a single ES module, dist/index.js, with the framework and the shell left out: the application that loads the plugin provides them. package.json already has the module field that the CLI reads to publish it, and .gitignore already ignores .harmonixrc.

Requirements​

Node.js 20.19 or later.