Skip to content

tvrcgo/easy-cmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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