0.0.3 • Published 8 years ago
plugie v0.0.3
Plugie
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()
.