scatter-plugin-all

Scatter plugin for requiring all the modules in a namespace

Synopsis

Plugin for the Scatter IoC container for injecting all the modules in a specified namespace.

var Scatter = require('scatter'),
  ScatterPluginAll = require('scatter-plugin-all');
 
 
var scatter = new Scatter({
  plugins: [new ScatterPluginAll()]
});
 
 
module.export = function(modules) {
  return {
    foofunction() {
      console.log(modules.moduleA);
      console.log(modules.moduleB);
      //etc... 
    }
  };
};
 
module.export.__module = {
  args: ["all!this/is/a/namespace"]
};
 

Stability

The API is in the process of settling, but has not yet had sufficient real-world testing to be considered stable.