You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The npm package name has changed from alternate-node-red-installer to @totallyinformation/nrinstall to allow easier running from `npx`. The old published package has now be deprecated.
12
+
13
+
### Other changes
14
+
15
+
***MAJOR**: You can now run the installer directly with npx without installing globally: `npx @totallyinformation/nrinstall -f <root folder name>`.
16
+
***MAJOR**: The command line command is now `nrinstall` (if you install globally) or `npx @totallyinformation/nrinstall` (if you don't install globally).
17
+
* Dependencies updated.
18
+
***MAJOR**: Changed name from alternate-node-red-installer to @totallyinformation/nrinstall to allow easier running from `npx`.
19
+
***MAJOR**: Updated the template example-settings.js file to be current with at least v4.1.8 of Node-RED.
20
+
* Changed to ESM modules.
21
+
* Updated the dependencies to the latest versions.
**WARNING**: Although this has the same major version number as the previous release, it is a breaking release. This is to allow the major versions to be aligned to Node-RED itself.
14
32
@@ -17,12 +35,12 @@ None
17
35
* Minimum version of Node.js supported is now v14 in alignment with Node-RED v3.
18
36
* Update to node-red v3.0.2 as minimum - the latest version of node-red will always be installed when `nrinstall` is run.
19
37
20
-
## Fixed
38
+
###Fixed
21
39
22
40
* Changes to the systemd service file - removing spurious quote characters.
23
41
* Changes to the `data/envfile.ini` file - removing spurious quote characters.
24
42
25
-
## Changed
43
+
###Changed
26
44
27
45
* Update `example-settings.js` to a newer version - aligned to node-red v3.0.2 with enhancements & additional help
28
46
* Removed `.eslintrc.js`/`.eslintrc.json` - not required
Copy file name to clipboardExpand all lines: README.md
+71-26Lines changed: 71 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,40 @@
1
-
# alternate-node-red-installer
2
-
An alternative installer for Node-RED. Avoids global installs, no admin rights required for new Node-RED instances.
1
+
# @totallyinformation/nrinstall
2
+
3
+
An alternative installer for Node-RED. Avoids global installs, no admin rights required for new Node-RED instances. Local install allows full control and even multiple different versions of Node-RED running in parallel. Works on any platform supported by Node.JS. It also includes an enhanced settings.js example file and some additional utility scripts.
3
4
4
5
> This solution is particularly suited for development environments and anywhere that you don't want to install global NodeJS scripts. Also when you need to have different versions of Node-RED running in parallel.
5
6
7
+
> [!NOTE]
8
+
> That the npm package name for this repository has changed from [`alternate-node-red-installer`](https://www.npmjs.com/package/alternate-node-red-installer) to [`@totallyinformation/nrinstall`](https://www.npmjs.com/package/@totallyinformation/nrinstall) to allow easier running from `npx`. The old published package has now be deprecated.
9
+
6
10
## Getting Started
7
11
8
12
1. Make sure that you have Node.JS correctly installed. Check that you can run it manually from the command line with `node --version && npm --version`.
9
-
2. Make sure that Node.js is at least at version 8.16.0 (LTS) or above.
10
-
3.For ease of use, install this package globally with `npm install -g alternate-node-red-installer`. You may need to use a command line with elevated rights (`sudo` on Linux).
11
-
12
-
Now, from any command line, you should be able to run the following:
Where <rootfoldername>` is a relative or absolute folder path that you want to be the root of your new Node-RED installation.
17
21
18
-
Where <rootfoldername>` is a relative or absolute folder path that you want to be the root of your new Node-RED installation.
22
+
4. Optional: install globally with `npm install -g @totallyinformation/nrinstall`. You may need to use a command line with elevated rights (`sudo` on Linux). Then run as:
19
23
20
-
Instead of the long-winded executable name, you can also use `nrinstall`
24
+
```
25
+
nrinstall -f <root folder name>
26
+
```
21
27
22
28
Example (for Mac, Linux or Windows PowerShell):
23
29
24
30
```
31
+
mkdir ~/nrtest
25
32
nrinstall -f ~/nrtest
26
33
```
27
34
28
35
Once the install has completed (it may take some time), you can navigate to the data sub-folder and work with Node-RED as normal (e.g. `cd ~/nrtest/data`).
29
36
30
-
You may wish to adjust the `settings.js` file and install any required Nodes at this point.
37
+
You may wish to adjust the `./data/settings.js` file. See the `./data/example-settings.js` file for an example enhanced settings file.
31
38
32
39
Run `npm run` to see the run commands available for your convenience. They are detailed in the README.md file installed in the data subfolder.
33
40
@@ -37,18 +44,20 @@ These instructions should work on any platform supported by Node.JS.
Here are some other links to my work that you may find interesting:
169
+
170
+
-[UIBUILDER for Node-RED](https://github.com/TotallyInformation/node-red-contrib-uibuilder)
171
+
- ❓ [Ideas, questions & general help](https://discourse.nodered.org/tag/node-red-contrib-uibuilder) - Ask your question on the Node-RED forum using the node-red-contrib-uibuilder tag.
172
+
- 📁 [Documentation](https://totallyinformation.github.io/node-red-contrib-uibuilder) - Go to the latest documentation.
173
+
- 🧑💻 [Flows](https://flows.nodered.org/search?term=uibuilder) - Example flows, nodes and collections related to UIBUILDER.
174
+
- ℹ️ [WIKI](https://github.com/TotallyInformation/node-red-contrib-uibuilder/wiki) - More documentation and examples.
175
+
- 📂 [Example Svelte External Template](https://github.com/TotallyInformation/uib-template-svelte-simple) - In case you want to build your own svelte app.
176
+
- 📂 [Example Simple External Template](https://github.com/TotallyInformation/uib-template-test) - In case you want to build your own external template.
177
+
- 📊 [uPlot UIBUILDER extension](https://github.com/TotallyInformation/nr-uibuilder-uplot) - Useful charts but also demonstrates how to build your own extension.
178
+
179
+
- 🧪 [Web Components Library](https://github.com/TotallyInformation/web-components) - A growing library of useful HTML Web Components. Useable with or without Node-RED & UIBUILDER. Some having specific enhancements for Node-RED but will still work well stand-alone. These now have their own dedicated documentation, demo and test website at https://wc.totallyinformation.net. Please check them out there.
180
+
181
+
- 🔨 [ui library module used by UIBUILDER](https://github.com/TotallyInformation/ui.js) - Can be used stand-alone for turning UI standard config JSON into HTML.
182
+
183
+
- 🕜 [node-red-contrib-moment](https://github.com/TotallyInformation/node-red-contrib-moment) - Nodes to make use of the MomentJS date/time handling library in Node-RED.
184
+
185
+
- 🧪 [Testbed for Node-RED custom nodes](https://github.com/TotallyInformation/Node-RED-Testbed) - Embodying more up-to-date thinking than the test nodes, a blank playground.
186
+
- 🧪 [Test Nodes for Node-RED](https://github.com/TotallyInformation/uib-template-test) - Some test nodes for Node-RED that help you understand how everything works.
187
+
188
+
- 🚤 [HotNipi Gauge Web Component](https://github.com/TotallyInformation/gauge-hotnipi) - A really nice looking gauge component. Works with Node-RED, UIBUILDER, or stand-alone.
189
+
190
+
- 🧪 [Array Grouper](https://github.com/TotallyInformation/groupit) - Stand-alone function to reshape an array of objects.
msg+=chalk`{red.bold Node-RED failed to install}\n`
108
+
msg+=chalkTemplate`{red.bold Node-RED failed to install}\n`
103
109
}
104
110
}
105
111
}
@@ -119,9 +125,9 @@ async function copyDataTemplate(pkgFolder, folder) {
119
125
'errorOnExist': true,
120
126
}
121
127
)
122
-
msg+=chalk`{green Copied template data (userDir) folder to ${fldrData}}\n`
128
+
msg+=chalkTemplate`{green Copied template data (userDir) folder to ${fldrData}}\n`
123
129
}catch(err){
124
-
msg+=chalk`{red.bold Data (userDir) folder already exists or cannot be created - NOT COPIED - Please use a folder name that does not exist. ${fldrData}}\n`
130
+
msg+=chalkTemplate`{red.bold Data (userDir) folder already exists or cannot be created - NOT COPIED - Please use a folder name that does not exist. ${fldrData}}\n`
125
131
return
126
132
}
127
133
@@ -131,10 +137,10 @@ async function copyDataTemplate(pkgFolder, folder) {
131
137
to: folder,
132
138
}
133
139
try{
134
-
constresults=awaitreplace(fileReplaceOpts)
140
+
constresults=awaitreplaceInFile(fileReplaceOpts)
135
141
console.log(`Replaced "<root-folder-name>" with ${folder}`,results)
136
142
}catch(error){
137
-
console.error(`FAILED to Replace "<root-folder-name>" with ${folder} - change manually before use`,error)
143
+
console.error(`FAILED to Replace "<root-folder-name>" with ${folder} - change manually before use. `,error)
138
144
}
139
145
}
140
146
@@ -149,9 +155,9 @@ async function copyMasterTemplate(pkgFolder, folder) {
149
155
'errorOnExist': true,
150
156
}
151
157
)
152
-
msg+=chalk`{green Copied template master folder from templates to root folder: ${folder}}\n`
158
+
msg+=chalkTemplate`{green Copied template master folder from templates to root folder: ${folder}}\n`
153
159
}catch(err){
154
-
msg+=chalk`{red.bold Root folder already exists or cannot be created - NOT COPIED - Please use a folder name that does not exist. ${folder}}\n`
160
+
msg+=chalkTemplate`{red.bold Root folder already exists or cannot be created - NOT COPIED - Please use a folder name that does not exist. ${folder}}\n`
155
161
return
156
162
}
157
163
@@ -161,10 +167,10 @@ async function copyMasterTemplate(pkgFolder, folder) {
161
167
to: folder,
162
168
}
163
169
try{
164
-
constresults=awaitreplace(fileReplaceOpts)
170
+
constresults=awaitreplaceInFile(fileReplaceOpts)
165
171
console.log(`Replaced "<root-folder-name>" with ${folder}`,results)
166
172
}catch(error){
167
-
console.error(`FAILED to Replace "<root-folder-name>" with ${folder} - change manually before use`,error)
173
+
console.error(`FAILED to Replace "<root-folder-name>" with ${folder} - change manually before use. `,error)
168
174
}
169
175
}
170
176
@@ -178,7 +184,7 @@ async function copySettings(pkgFolder, folder) {
0 commit comments