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
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,11 @@ them easy to install along with any dependencies they may have.
10
10
11
11
### Naming
12
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.
13
+
Packages first published after the 1st Feb 2022 should use a [scoped name](https://docs.npmjs.com/cli/v8/using-npm/scope), within the scope of your own namespace there are no other restrictions on what you can name your package, you may use either `@myScope/node-red-sample` or `@myScope/sample` Please remember to use `node-red` not `nodered`.
14
+
15
+
If you are forking an existing pacakge you should keep the same name but release under your own scope, (if its an unscoped package then use the contrib name under your own scope) Remember, forking should be a last resort if the orignal maintainer is not responsive to your contributions.
16
+
17
+
Older packages used an unscoped namespace and the `node-red-contrib-*` format, these do not need to be changed.
15
18
16
19
### Directory structure
17
20
@@ -21,10 +24,10 @@ Here is a typical directory structure for a node package:
21
24
├── LICENSE
22
25
├── README.md
23
26
├── package.json
24
-
└── sample
25
-
├── examples
27
+
├── examples
26
28
│ ├── example-1.json
27
29
│ └── example-2.json
30
+
└── sample
28
31
├── icons
29
32
│ └── my-icon.svg
30
33
├── sample.html
@@ -34,6 +37,7 @@ Here is a typical directory structure for a node package:
34
37
There are no strict requirements over the directory structure used within the
35
38
package. If a package contains multiple nodes, they could all exist in the same
36
39
directory, or they could each be placed in their own sub-directory.
40
+
The examples folder must be in the root of the package.
37
41
38
42
### Testing a node module locally
39
43
@@ -68,7 +72,7 @@ for others to be able to use it.</div>
0 commit comments