0.0.3 • Published 8 years ago

plugie v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Plugie

NPM version NPM download

Plugin system for creating a CLI tool.

Usage

First of all, type npm install --save plugie to install it.

Then require it in your package:

const Plugie = require("plugie");

const handlers = {
    command: function() {
      // Handle a command
    },
    generator: function() {
      // Handle a generator
    }
  };

const plugie = new Plugie({
  name: "plugie",
  types: Object.keys(handlers),
  handlers
});

module.exports = plugie;

If you have installed packages with a name starts with plugie-command- or plugie-generator-, you will get them when you call plugie.load().