Skip to content

Instantly share code, notes, and snippets.

@nahoskins
Forked from jonnor/noflo-list-components.js
Last active August 29, 2015 14:08
Show Gist options
  • Save nahoskins/8838a643772d6afb554f to your computer and use it in GitHub Desktop.
Save nahoskins/8838a643772d6afb554f to your computer and use it in GitHub Desktop.
var noflo = require('noflo');
var rootdir = './';
var loader = new noflo.ComponentLoader(rootdir);
loader.listComponents(function() {
console.log(loader.components);
Object.keys(loader.components).forEach(function(name) {
loader.load(name, function(component) {
console.log(name);
console.log(component.description);
// for each port, should look at the .options key
// it has "description, type, datatype etc"
console.log(component.inPorts);
console.log(component.outPorts);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment