easy-cmd

0.1.2 • Public • Published

easy-cmd

Easy to build command tool.

npm install easy-cmd --save-dev

Usage

bin/xxx.js

#!/usr/bin/env node
const cli = require('easy-cmd')
cli.parse()

command/sub-cmd.js

exports.options = {
  desc: 'command description.'
}
 
exports.run = function* (argv, cmd) {
  // execute node module
  yield cmd.fork('module-path', args, options)
}

Readme

Keywords

Package Sidebar

Install

npm i easy-cmd

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • tvrcgo