Skip to content

clijs/command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published