add support for examples of core nodes

This commit is contained in:
Hiroyasu Nishiyama 2020-02-03 12:59:12 +09:00
parent 6b52206186
commit 36bf2a3c38
1 changed files with 4 additions and 0 deletions

View File

@ -286,6 +286,10 @@ function getNodeFiles(disableNodePathScan) {
nodeFiles.forEach(function(node) {
nodeList["node-red"].nodes[node.name] = node;
});
if (settings.coreNodesDir) {
var examplesDir = path.join(settings.coreNodesDir,"examples");
nodeList["node-red"].examples = {path: examplesDir};
}
if (!disableNodePathScan) {
var moduleFiles = scanTreeForNodesModules();