GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - AllanOricil/nrg-template: Build Node-red nodes using ES6+ and esm module system with the nrg cli

This repository was archived by the owner on Jan 7, 2025. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

95 Commits
95 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.husky
.husky
 
 
images
images
 
 
src
src
 
 
tests
tests
 
 
.browserslistrc
.browserslistrc
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.prettierignore
.prettierignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
commitlint.config.js
commitlint.config.js
 
 
jsconfig.json
jsconfig.json
 
 
nrg.config.js
nrg.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
playwright.config.js
playwright.config.js
 
 
vitest.config.client.js
vitest.config.client.js
 
 
vitest.config.server.js
vitest.config.server.js
 
 

Repository files navigation

build status

nrg-template

This project illustrates the utilization of the nrg CLI for the development of Node-RED nodes.

šŸ“ Directory Structure

This project is built using the nrg cli.

nrg-template/
└── src/
    └── nodes/
        ā”œā”€ā”€ node-1/
        │   ā”œā”€ā”€ client/
        │   │   ā”œā”€ā”€ locales/
        │   │   │   ā”œā”€ā”€ labels/
        │   │   │   │   ā”œā”€ā”€ de.json
        │   │   │   │   └── en-US.json
        │   │   │   └── docs/
        │   │   │       ā”œā”€ā”€ de.html
        │   │   │       └── en-US.html
        │   │   ā”œā”€ā”€ icons/
        │   │   │   └── icon-1.png
        │   │   ā”œā”€ā”€ index.html
        │   │   └── index.js
        │   └── server/
        │       └── index.js
        └── node-2/
            ā”œā”€ā”€ client/
            │   ā”œā”€ā”€ locales/
            │   │   ā”œā”€ā”€ labels/
            │   │   │   ā”œā”€ā”€ de.json
            │   │   │   └── en-US.json
            │   │   └── docs/
            │   │       ā”œā”€ā”€ de.html
            │   │       └── en-US.html
            │   ā”œā”€ā”€ icons/
            │   │   └── icon-2.png
            │   ā”œā”€ā”€ index.html
            │   └── index.js
            └── server/
                └── index.js

dist

nrg-template/
└── dist/
    ā”œā”€ā”€ icons/
    │   ā”œā”€ā”€ icon-1.png
    │   └── icon-2.png
    ā”œā”€ā”€ locales/
    │   ā”œā”€ā”€ de/
    │   │   ā”œā”€ā”€ index.html
    │   │   └── index.json
    │   └── en-US/
    │       ā”œā”€ā”€ index.html
    │       └── index.json
    ā”œā”€ā”€ index.html
    ā”œā”€ā”€ index.js.map
    └── index.js

šŸ’» Dev Environment Requirements

Tool Version
node >= 18
npm >= 10

šŸ“– How to test your node

  1. open a terminal in the root of this project
  2. run npm install
  3. run npm run start and wait for your browser to open.

šŸ“– Other commands

All the following commands are set in the scripts section of package.json and were created using the nrg CLI.

npm run build

Builds the project for production.

npm run build:dev

Builds the project for development.

npm run start

Starts Node-RED with nodes built for development.

npm run start:prod

Starts Node-RED with nodes built for production.

npm run start:debug

Starts Node-RED with nodes built for development and enables debug mode, allowing you to attach a debugger to the server side.

npm run watch

Starts Node-RED with nodes built for development and enables watch mode. This will automatically rebuild your nodes, restart the flows, and refresh/open the browser whenever changes are made to files in ./src.

npm run watch:debug

Starts Node-RED with nodes built for development in both watch and debug modes. This setup allows you to automatically rebuild, restart, and debug the server side with the ability to attach a debugger.

Creating Nodes

If you have the nrg CLI installed globaly, you can create a new node with the following commnad:

nrg create node -n my-node-name

or, if you have it installed as a dev dependency, you can use:

./node_modules/.bin/nrg create node -n my-node-name

Starting a new nrg project

If you have the nrg CLI installed globally, you can run the following commands to get started:

nrg create -n my-nrg-project
cd my-nrg-project

npm install
# pnpm install
# yarn install

About

Build Node-red nodes using ES6+ and esm module system with the nrg cli

Topics

es6esmnode-rednrg

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

1 watching

Forks

2 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.