diff --git a/red/nodes/registry.js b/red/nodes/registry.js index 382a91966..03c20d061 100644 --- a/red/nodes/registry.js +++ b/red/nodes/registry.js @@ -36,6 +36,7 @@ function loadTemplate(templateFilename) { whenNode.call(fs.readFile,templateFilename,'utf8').done(function(content) { registerConfig(content); resolve(); + //console.log(templateFilename); }, function(err) { reject("missing template file"); }); @@ -43,36 +44,39 @@ function loadTemplate(templateFilename) { }); } -function loadNode(nodeDir, nodeFn) { +// Return a promise that resolves to: +// success: {fn,path} +// failure: {fn.path,err} +function loadNode(nodeDir, nodeFn, nodeLabel) { return when.promise(function(resolve,reject) { if (settings.nodesExcludes) { for (var i=0;i