Skip to content

Commit

Permalink
Support for custom component loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Nov 2, 2013
1 parent cc16638 commit 073eb25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ NoFlo ChangeLog
- For components, provide via the `icon` attribute
* Subgraphs now support closing their internal NoFlo network via the `shutdown` method
* Component Loader is able to load arbitrary graphs outside of the normal package manifest registration via the `loadGraph` method
* Libraries can provide a custom loader for their components by registering a `noflo.loader` key in the manifest pointing to a CommonJS module
* Exported ports can now contain metadata

## 0.4.2 (September 28th 2013)
Expand Down
4 changes: 4 additions & 0 deletions src/lib/ComponentLoader.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class ComponentLoader

if moduleName[0] is '/'
moduleName = moduleName.substr 1
if definition.noflo.loader
# Run a custom component loader
loader = require definition.noflo.loader
loader @
if definition.noflo.components
for name, cPath of definition.noflo.components
if cPath.indexOf('.coffee') isnt -1
Expand Down

0 comments on commit 073eb25

Please sign in to comment.