npm.io
0.1.1 • Published 11 years ago

auto-cli

Licence
—
Version
0.1.1
Deps
2
Vulns
0
Weekly
0
Stars
1

Usage

$ npm install auto-cli
$ cat cli.js 
var auto_cli = require('auto-cli');

auto_cli(['html', '--verbose'])
.then(function( input ){
    console.log( input );
});
$ node cli.js 404.html --verbose
{ html: '404.html', '--verbose': true }

Arguments are determined base on ".html" filename extension and option name "--verbose".
Argument order does not matter.

$ node cli.js --verbose 404.html  
{ html: '404.html', '--verbose': true }

Keywords