Moddable SDK manifests in flows #106
Replies: 4 comments 6 replies
-
For those who don't know how to add the property into the node's properties (me for example), in the node's html file, in the defaults section, add
So I surmounted that obstacle, and checked it was looking for the manifest by not providing one, and I get a build error saying it can't find it. |
Beta Was this translation helpful? Give feedback.
-
I am a bit confused by the example. I thought it would be possible to put the manifest file in the node's source folder, but I see the modable_manifest property is pointing to the node's git repository. |
Beta Was this translation helpful? Give feedback.
-
In the html file, where one has something like
will that allow the specification of a particular release of the repository? There has been discussion about this in the node-red forum here where @ralphwetzel has pointed out that if I include a manifest file in the package's root folder then the plugin will automatically include it, so in that case there is no need to provide it via the route proposed here, so at the moment I am confused about what I should do. |
Beta Was this translation helpful? Give feedback.
-
Thanks, that has clarified it a lot. |
Beta Was this translation helpful? Give feedback.
-
I've implemented the ability for any Node-RED node to include a Moddable SDK manifest in its exported flow configuration. The primarily motivation is to allow the MCU Sensor and MCU Clock nodes to automatically add the required Sensor or Clock driver to the project. Prior to these changes, developers had to manually edit manifest files to add the drivers. That's been a little confusing and a bit of a headache.
The database used by the MCU Clock and MCU Sensor nodes has contained the driver path and the Clock and Sensor nodes have displayed the driver path. That was in anticipation of making this automatic.
The way the feature works is that that a node includes a
moddable_manifest
property with the manifest it requires. For the sensor node, this is just an include:The Moddable SDK build tool (
mcconfig
) processes all the manifests embedded in the Node-RED flows.json as part of a build.Thanks to @ralphwetzel for suggesting the use of an unambiguously unique property name for this. That allows it to work with any node.
This feature has quite a bit of power. The MCU Clock and MCU Sensor nodes just scratch the surface of what is possible. I hope to have another example of what is possible in the coming days.
This property may also be a good way for a Node-RED contributed node to signal that it is compatible with Node-RED MCU Edition. The presence of
modadble_manifest
can be considered an indication that the author intends for it to be used with the MCU, and also allows the author to explicitly indicate which source files should be included, module specifies to use, etc.To try this out you need to update just-about-everything:
If you have a chance to try this out, please let me know how it goes. I'm interested to hear that it is working for you and happy to help try to resolve any issues that come up.
Beta Was this translation helpful? Give feedback.
All reactions