addon

0.0.0 • Public • Published

node-addon

Make your app modular

Usage

var addon = require('addon');
 
var app = {};
 
addon.call(app, __dirname + '/plugins/*.js');
 
app.hello();
 
// console output
hello, anonymous

In plugins/hello.js:

module.exports = function helloPlugin() {
  var app = this;
  app.hello = function (name) {
    console.log('hello, ' + name || 'anonymous');
  };
};

/addon/

    Package Sidebar

    Install

    npm i addon

    Weekly Downloads

    714

    Version

    0.0.0

    License

    MIT

    Last publish

    Collaborators

    • hyjin