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)
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    3
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i easy-cmd

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • tvrcgo