plugie

0.0.3 • Public • Published

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().

Readme

Keywords

Package Sidebar

Install

npm i plugie

Weekly Downloads

2

Version

0.0.3

License

MIT

Last publish

Collaborators

  • ourai