Skip to content

Commit b1263a4

Browse files
committed
Updates for 1.1.0
1 parent cc786e4 commit b1263a4

8 files changed

Lines changed: 245 additions & 67 deletions

File tree

docs/creating-nodes/appearance.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,22 @@ The icon can be either:
5858
</style>
5959

6060
<ul class="nr-icon-list">
61-
<li><img src="images/alert.svg"/> alert.png</li>
62-
<li><img src="images/arrow-in.svg"/> arrow-in.png</li>
63-
<li><img src="images/bridge-dash.svg"/> bridge-dash.png</li>
64-
<li><img src="images/bridge.svg"/> bridge.png</li>
65-
<li><img src="images/db.svg"/> db.png</li>
66-
<li><img src="images/debug.svg"/> debug.png</li>
67-
<li><img src="images/envelope.svg"/> envelope.png</li>
68-
<li><img src="images/feed.svg"/> feed.png</li>
69-
<li><img src="images/file.svg"/> file.png</li>
70-
<li><img src="images/function.svg"/> function.png</li>
71-
<li><img src="images/hash.svg"/> hash.png</li>
72-
<li><img src="images/inject.svg"/> inject.png</li>
73-
<li><img src="images/light.svg"/> light.png</li>
74-
<li><img src="images/serial.svg"/> serial.png</li>
75-
<li><img src="images/template.svg"/> template.png</li>
76-
<li><img src="images/white-globe.svg"/> white-globe.png</li>
61+
<li><img src="images/alert.svg"/> alert.svg</li>
62+
<li><img src="images/arrow-in.svg"/> arrow-in.svg</li>
63+
<li><img src="images/bridge-dash.svg"/> bridge-dash.svg</li>
64+
<li><img src="images/bridge.svg"/> bridge.svg</li>
65+
<li><img src="images/db.svg"/> db.svg</li>
66+
<li><img src="images/debug.svg"/> debug.svg</li>
67+
<li><img src="images/envelope.svg"/> envelope.svg</li>
68+
<li><img src="images/feed.svg"/> feed.svg</li>
69+
<li><img src="images/file.svg"/> file.svg</li>
70+
<li><img src="images/function.svg"/> function.svg</li>
71+
<li><img src="images/hash.svg"/> hash.svg</li>
72+
<li><img src="images/inject.svg"/> inject.svg</li>
73+
<li><img src="images/light.svg"/> light.svg</li>
74+
<li><img src="images/serial.svg"/> serial.svg</li>
75+
<li><img src="images/template.svg"/> template.svg</li>
76+
<li><img src="images/white-globe.svg"/> white-globe.svg</li>
7777
</ul>
7878

7979
**Note**: In Node-RED 1.0, all of these icons have been replaced with SVG alternatives
@@ -86,7 +86,7 @@ A node can provide its own icon in a directory called `icons` alongside its `.js
8686
and `.html` files. These directories get added to the search path when the editor
8787
looks for a given icon filename. Because of this, the icon filename must be unique.
8888

89-
The icon should be white on a transparent background, 40 x 60 in size.
89+
The icon should be white on a transparent background, with a 2:3 aspect ratio, with a minimum of 40 x 60 in size.
9090

9191
#### Font Awesome icon
9292

docs/creating-nodes/node-js.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,13 @@ this.on('close', function(done) {
179179

180180
If the registered listener accepts two arguments, the first will be a boolean
181181
flag that indicates whether the node is being closed because it has been removed
182-
entirely, or that it is just being restarted.
182+
entirely, or that it is just being restarted. It will also be set to *true* if the
183+
node has been disabled.
183184

184185
{% highlight javascript %}
185186
this.on('close', function(removed, done) {
186187
if (removed) {
187-
// This node has been deleted
188+
// This node has been disabled/deleted
188189
} else {
189190
// This node is being restarted
190191
}
@@ -203,8 +204,6 @@ In 0.17 and later, the runtime will timeout the node if it takes longer than 15
203204
seconds. An error will be logged and the runtime will continue to operate.
204205

205206

206-
207-
208207
### Logging events
209208

210209
If a node needs to log something to the console, it can use one of the follow functions:

docs/creating-nodes/packaging.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ slug: packaging
88
Nodes can be packaged as modules and published to the npm repository. This makes
99
them easy to install along with any dependencies they may have.
1010

11+
### Naming
12+
13+
If you wish to use **node-red** in the name of your node please use `node-red-contrib-` as a prefix to their name to make it clear they are not maintained by the Node-RED project. Alternatively, any name
14+
that doesn't use `node-red` as a prefix can be used.
15+
1116
### Directory structure
1217

1318
Here is a typical directory structure for a node package:
@@ -46,8 +51,9 @@ up by simply restarting Node-RED.
4651
### package.json
4752

4853
Along with the usual entries, the `package.json` file must contain a `node-red`
49-
entry that identifies what nodes the module provides, along with a pointer to
50-
their `.js` files.
54+
entry that lists the `.js` files that contain nodes for the runtime to load.
55+
56+
If you have multiple nodes in a single file, you only have to list the file once.
5157

5258
If any of the nodes have dependencies on other npm modules, they must be included
5359
in the `dependencies` property.
@@ -76,10 +82,6 @@ for others to be able to use it.</div>
7682
}
7783
{% endhighlight %}
7884

79-
### Naming
80-
81-
If you wish to use **node-red** in the name of your node please use `node-red-contrib-` as a prefix to their name to make it clear they are not maintained by the Node-RED project. Alternatively, any name
82-
that doesn't use `node-red` as a prefix can be used.
8385

8486
### README.md
8587

@@ -104,24 +106,24 @@ A basic overview is available [here](https://docs.npmjs.com/misc/developers).
104106

105107
### Adding to flows.nodered.org
106108

107-
As of April 2020, the [the Node-RED Flow Library](https://flows.nodered.org)
108-
is no longer able to automatically index and update nodes published on
109-
npm with the `node-red` keyword. Instead, a submission request has to be
110-
placed manually.
111-
112-
To do so, make sure all of the packaging requests are met. To add a new node
113-
to the library, click on the `+` button at the top of
114-
[the library's page](https://flows.nodered.org), and select the 'node' option.
115-
This button takes you to
116-
[the Adding a Node page](https://flows.nodered.org/add/node). Here, the list of
117-
requirements is repeated and describes the steps to have it added to the
109+
As of April 2020, the [the Node-RED Flow Library](https://flows.nodered.org)
110+
is no longer able to automatically index and update nodes published on
111+
npm with the `node-red` keyword. Instead, a submission request has to be
112+
placed manually.
113+
114+
To do so, make sure all of the packaging requests are met. To add a new node
115+
to the library, click on the `+` button at the top of
116+
[the library's page](https://flows.nodered.org), and select the 'node' option.
117+
This button takes you to
118+
[the Adding a Node page](https://flows.nodered.org/add/node). Here, the list of
119+
requirements is repeated and describes the steps to have it added to the
118120
library.
119121

120-
To update an existing node, you can either resubmit it the same way as you
121-
would for a new node, or request a refresh from the node's page on the
122-
flow library through the 'request refresh' link. This is only visible to
122+
To update an existing node, you can either resubmit it the same way as you
123+
would for a new node, or request a refresh from the node's page on the
124+
flow library through the 'request refresh' link. This is only visible to
123125
logged in users.
124126

125-
If it does not appear after that time, you can ask for help on the
126-
[Node-RED forum](https://discourse.nodered.org) or
127+
If it does not appear after that time, you can ask for help on the
128+
[Node-RED forum](https://discourse.nodered.org) or
127129
[slack](https://nodered.org/slack).

docs/creating-nodes/properties.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ The entries in the `defaults` object must be objects and can have the following
5959

6060
### Reserved property names
6161

62-
There are some reserved names for properties that must not be used. These are:
62+
There are some reserved names for properties that **must not be used**. These are:
6363

64-
> `type`, `x`, `y`, `z`, `wires`, `outputs`
64+
- Any single character - `x`, `y`, `z`, `d`, `g`, `l` are already used. Others are
65+
reserved for future use.
66+
- `id`, `type`, `wires`, `inputs`, `outputs`
6567

6668

6769
If a node wants to allow the number of outputs it provides to be configurable

docs/getting-started/local.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ Node-RED can be started using the command `node-red`. This command can take
133133
various arguments:
134134

135135
```
136-
node-red [-v] [-?] [--port PORT] [--safe] [--settings settings.js]
137-
[--title TITLE] [--userDir DIR] [flows.json|projectName]
136+
node-red [-v] [-?] [--settings settings.js] [--userDir DIR]
137+
[--port PORT] [--title TITLE] [--safe] [flows.json|projectName]
138+
[-D X=Y|@file]
138139
```
139140

140-
141141
Option | Description |
142142
------------------------|-----------------|
143143
`-p`, `--port PORT` | Sets the TCP port the runtime listens on. Default: `1880` |
@@ -146,15 +146,41 @@ Option | Description |
146146
`--title TITLE` | Set process window title |
147147
`-u`, `--userDir DIR` | Sets the user directory to use. Default: `~/.node-red` |
148148
`-v` | Enables verbose output |
149+
`-D X=Y|@file` | [Override individual settings](#override-individual-settings) |
149150
`-?`, `--help` | Shows command-line usage help and exits |
150151
`flows.json|projectName`| If the Projects feature is not enabled, this sets the flow file you want to work with. If the Projects feature is enabled, this identifies which project should be started. |
151152

152-
153153
Node-RED uses `flows_<hostname>.json` as the default flows file. If the computer
154154
you are running on may change its hostname, then you should ensure you provide a
155155
static file name; either as a command-line argument or using the `flowsFile` option
156156
in your [settings file](/docs/user-guide/runtime/settings-file).
157157

158+
#### Override individual settings
159+
160+
*Since Node-RED 1.1.0*
161+
162+
You can override individual settings on the command-line using the `-D` (or `--define`)
163+
option.
164+
165+
For example, to change the logging level you can use:
166+
```
167+
-D logging.console.level=trace
168+
```
169+
170+
You can also provide the custom settings as a file:
171+
```
172+
-D @./custom-settings.txt
173+
```
174+
175+
The file should contain a list of the settings to override:
176+
```
177+
logging.console.level=trace
178+
logging.console.audit=true
179+
```
180+
181+
182+
183+
158184
### Passing arguments to the underlying Node.js process
159185

160186
There are occasions when it is necessary to pass arguments to the underlying

docs/user-guide/node-red-admin.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ redirect_from:
1010
The [node-red-admin](http://npmjs.org/package/node-red-admin) command-line tool allows you to remotely administer a Node-RED
1111
instance.
1212

13+
Since Node-RED 1.1.0, `node-red-admin` is now built into the `node-red` command -
14+
you do not need to install it separately.
15+
16+
To run it, you use `node-red admin` instead of `node-red-admin`.
17+
18+
1319
### Installation
1420

1521
Install this globally to make the `node-red-admin` command available on
@@ -46,11 +52,13 @@ the target and access token information.
4652

4753
The tool provides the following commands:
4854

49-
- `list` - List all of the installed nodes
50-
- `info` - Display more information about the module or node set
51-
- `enable` - Enable the specified module or node set
55+
- `target` - Set or view the target URL and port like http://localhost:1880
56+
- `login` - Log user in to the target of the Node-RED admin API
57+
- `list` - List all of the installed nodes
58+
- `info` - Display more information about the module or node
59+
- `enable` - Enable the specified module or node set
5260
- `disable` - Disable the specified module or node set
53-
- `search` - Search NPM for Node-RED modules relating to the search-term given
54-
- `install` - Install a module from NPM
55-
- `remove` - Remove an NPM module
56-
- `hash-pw` - Create a password hash that can be used with the `adminAuth` and `httpNodeAuth` settings
61+
- `search` - Search for Node-RED modules to install
62+
- `install` - Install the module from NPM to Node-RED
63+
- `remove` - Remove the NPM module from Node-RED
64+
- `hash-pw` - Create a password hash that can be used with the `adminAuth` and `httpNodeAuth` settings

0 commit comments

Comments
 (0)