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
Copy file name to clipboardExpand all lines: docs/creating-nodes/packaging.md
+24-22Lines changed: 24 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,11 @@ slug: packaging
8
8
Nodes can be packaged as modules and published to the npm repository. This makes
9
9
them easy to install along with any dependencies they may have.
10
10
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
+
11
16
### Directory structure
12
17
13
18
Here is a typical directory structure for a node package:
@@ -46,8 +51,9 @@ up by simply restarting Node-RED.
46
51
### package.json
47
52
48
53
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.
51
57
52
58
If any of the nodes have dependencies on other npm modules, they must be included
53
59
in the `dependencies` property.
@@ -76,10 +82,6 @@ for others to be able to use it.</div>
76
82
}
77
83
{% endhighlight %}
78
84
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.
83
85
84
86
### README.md
85
87
@@ -104,24 +106,24 @@ A basic overview is available [here](https://docs.npmjs.com/misc/developers).
104
106
105
107
### Adding to flows.nodered.org
106
108
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
118
120
library.
119
121
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
123
125
logged in users.
124
126
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
`-?`, `--help` | Shows command-line usage help and exits |
150
151
`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. |
151
152
152
-
153
153
Node-RED uses `flows_<hostname>.json` as the default flows file. If the computer
154
154
you are running on may change its hostname, then you should ensure you provide a
155
155
static file name; either as a command-line argument or using the `flowsFile` option
156
156
in your [settings file](/docs/user-guide/runtime/settings-file).
157
157
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
+
158
184
### Passing arguments to the underlying Node.js process
159
185
160
186
There are occasions when it is necessary to pass arguments to the underlying
0 commit comments