bem-tools-core is a CLI runner for its plugins
npm install bem-tools-corebem-tools-core is a CLI runner for its plugins.
Plugins are npm packages exporting COA command. By convention they should be named with bem-tools- prefix so bem-tools-core may find them among other packages.
cli.js file to be used with bem-tools-core.bem-tools- prefix.bem-tools-core). You may export plugin functionality from index.js file in the root of your package.COA command via cli.js file:``js``
module.exports = function() {
this
.title('Title of your plugin').helpful()
.opt()
.name('foo').short('f').long('foo')
.title('Foo')
.end()
.arg()
.name('bar').title('Bar')
.arr()
.end()
.act(function(opts, args) {
console.log(opts.foo, args.bar);
})
.end();
};
For more info about COA please refer to https://www.npmjs.com/package/coa.