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

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i easy-cmd

    Weekly Downloads

    3

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • tvrcgo