Skip to content

Commit b9f9032

Browse files
committed
Change of naming convention and fix to examples path
1 parent d6161e0 commit b9f9032

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/creating-nodes/packaging.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ them easy to install along with any dependencies they may have.
1010

1111
### Naming
1212

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.
1518

1619
### Directory structure
1720

@@ -21,10 +24,10 @@ Here is a typical directory structure for a node package:
2124
├── LICENSE
2225
├── README.md
2326
├── package.json
24-
└── sample
25-
├── examples
27+
├── examples
2628
│   ├── example-1.json
2729
│   └── example-2.json
30+
└── sample
2831
├── icons
2932
│   └── my-icon.svg
3033
├── sample.html
@@ -34,6 +37,7 @@ Here is a typical directory structure for a node package:
3437
There are no strict requirements over the directory structure used within the
3538
package. If a package contains multiple nodes, they could all exist in the same
3639
directory, or they could each be placed in their own sub-directory.
40+
The examples folder must be in the root of the package.
3741

3842
### Testing a node module locally
3943

@@ -68,7 +72,7 @@ for others to be able to use it.</div>
6872

6973
{% highlight json %}
7074
{
71-
"name" : "node-red-contrib-samplenode",
75+
"name" : "@myScope/node-red-sample",
7276
"version" : "0.0.1",
7377
"description" : "A sample node for node-red",
7478
"dependencies": {

0 commit comments

Comments
 (0)