scatter-plugin-all

0.1.0 • Public • Published

NPM version Dependency Status Dependency Status

Synopsis

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

Usage

Setup Scatter to use the plugin

var Scatter = require('scatter'),
  ScatterPluginAll = require('scatter-plugin-all');
 
 
var scatter = new Scatter({
  plugins: [new ScatterPluginAll()]
});
 

Inject all the modules of a namespace

 
module.export = function(modules) {
  return {
    foo: function() {
      console.log(modules.moduleA);
      console.log(modules.moduleB);
      //etc...
    }
  };
};
 
module.export.__module = {
  args: ["all!this/is/a/namespace"]
};
 

Stability

2 - Unstable

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


Bitdeli Badge

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i scatter-plugin-all

    Weekly Downloads

    14

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • mariocasciaro