Nitrate Processed Mincemeat

    @ghostmonitor/recart-di-loader

    7.6.1 • Public • Published

    Greenkeeper badge

    • Loads dependency injectable modules from /services directory
    • A module must return with a constructor that has a dependencies property
    module.exports = function(dep1, dep2) {
      // body of singleton service
    }
    module.exports.dependencies = ['dep1', 'dep2']
    • If a dependency doesn't exist in /services that it tries to load the @ghostmonitor/recart-di-<depname> npm package.

    #Usage services/index.js:

    const Bottle = require('bottlejs')
    const di = new Bottle()
    const loader = require('@ghostmonitor/recart-di-loader')
    loader.loadLocalServices(di)
    
    module.exports = di.container

    Keywords

    none

    Install

    npm i @ghostmonitor/recart-di-loader

    DownloadsWeekly Downloads

    20

    Version

    7.6.1

    License

    ISC

    Unpacked Size

    8.39 kB

    Total Files

    8

    Last publish

    Collaborators

    • ghostmonitor