1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Created npm installable nodes (markdown)

Nick O'Leary 2014-05-04 03:29:43 -07:00
parent 591c897c2c
commit 3465ba4e6e

17
npm-installable-nodes.md Normal file

@ -0,0 +1,17 @@
Most of the code already exists for this, but there are some design decisions to be solidified before 'releasing' it.
On start-up, we search the node_modules path using the same scheme as [require](http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders). This is done from the Node-RED install directory and down. We look for instances of `package.json` that contain a `node-red` property.
The `node-red` property contains a `nodes` property that identifies what nodes are provided by the module and where they should be loaded from.
````
"node-red" : {
"nodes": {
"foo": "foo/foo.js",
"bar": "bar/bar.js"
}
}
````
> **Question:** rather than just have the location is the value, should that be an object itself to enable additional properties to be defined in the future?