Updated the template repo with recommended .vscode extensions, eslint and prettier:
It is really easy to build your node library with this template
pnpm install
pnpm build
After building your node library, a dist
will appear in your local directory
You can install the build to your local Node-RED instance running
cd ~/.node-red
npm install ${PATH_CLONED_REPO}/dist
The index.html
file is generated automatically.
The files under dist
can be published to npm or other package manager of your choice. It contains everything consumers will need, like source maps and type declarations.
Server dependencies are not bundled. They will be installed by Node-RED using the package.json
. Client dependencies are bundled and can be chuncked for fast loading. There is an example in /src/server/vite.config.ts
. Tree shaking is performed in both builds.
TODOS
- vite plugin to process locales
- vite plugin to process docs
- package core lib
- .github workflows for CI/CD and release with semantic-release
- a ton of type definitions for node-red RED (client and server) and jquery widgets
If you have ideas just open a PR or leave a comment here. Thanks.