Skip to content

alex2844/node-red-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node-RED Builder

🌐 English | Русский

npm license

A monorepo with tools for developing and publishing Node-RED nodes. Requires Bun.

Package Description
node-red-builder CLI and runtime framework
create-node-red Project scaffolding

Quick Start

npm create node-red my-nodes
cd my-nodes
npm install
npm run dev   # → http://localhost:3000

Project Structure

After scaffolding:

my-nodes/
├── node-red-builder.config.js
├── package.json
├── src/
│   ├── nodes/
│   │   └── example/
│   │       ├── runtime.js       # Node.js runtime
│   │       ├── shared.js        # Shared logic and constants
│   │       ├── ui.js            # Browser editor logic
│   │       └── template.html    # Editor panel HTML
│   └── locales/
│       └── en-US/
│           └── example.json
└── docs/
    └── en-US/
        └── nodes/
            └── example.md

After npm run build:

dist/
└── nodes/
    ├── example.js
    ├── example.html
    └── locales/
        └── en-US/
            ├── example.json
            └── example.html

Available Scripts

The generated package.json includes:

npm run dev     build + start Node-RED + watch for changes
npm run start   start Node-RED (no build, no watch)
npm run build   build all nodes for production
npm test        run type checking with tsc

To add a new node to the project:

bunx nrb add my-sensor
bunx nrb add --type config

Configuration

node-red-builder.config.js:

export default {
    prefix: 'my',
    port: 3000,
    palette: {
        color: '#a6bbcf',
    },
    // srcDir: 'src',
    // distDir: 'dist',
    // docsDir: 'docs',
    // localesDir: 'src/locales',
};