Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 725 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 725 Bytes

command NPM Version Travis

Create a command context in a cli.js app

Install

npm install @cli/command --save

Usage

var alias = require('@cli/alias')
var handler = requrie('@cli/handler')
var command = require('@cli/command')
var app = require('@cli/app')
var run = require('@cli/run')

var testCommand = command(
  alias('test'),
  handler(function () {/* do something here */})
)

var cli = app(
  testCommand()
)

run(process.argv.slice(2), cli())