improved readme
This commit is contained in:
parent
9bb85ca666
commit
f6969ecfd5
14
README.md
14
README.md
@ -6,12 +6,24 @@ nodejs wrapper for CLI related tasks
|
|||||||
[![Build Status](https://travis-ci.org/pushrocks/smartcli.svg?branch=master)](https://travis-ci.org/pushrocks/smartcli)
|
[![Build Status](https://travis-ci.org/pushrocks/smartcli.svg?branch=master)](https://travis-ci.org/pushrocks/smartcli)
|
||||||
[![devDependency Status](https://david-dm.org/pushrocks/smartcli/dev-status.svg)](https://david-dm.org/pushrocks/smartcli#info=devDependencies)
|
[![devDependency Status](https://david-dm.org/pushrocks/smartcli/dev-status.svg)](https://david-dm.org/pushrocks/smartcli#info=devDependencies)
|
||||||
|
|
||||||
|
### Install the package
|
||||||
|
npm install smartcli
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
```js
|
```js
|
||||||
|
var smartcli = require("smartcli");
|
||||||
|
|
||||||
//returns true for terminal command "node yourjs.js jazz"
|
//returns true for terminal command "node myjs.js jazz"
|
||||||
smartcli.checkCommand('jazz');
|
smartcli.checkCommand('jazz');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns an object for terminal command "node myjs.js --myoption something like so
|
||||||
|
* {
|
||||||
|
* name: 'myoption',
|
||||||
|
* specified: true,
|
||||||
|
* value: 'something'
|
||||||
|
* }
|
||||||
|
*/
|
||||||
smartcli.getOption('myoption');
|
smartcli.getOption('myoption');
|
||||||
``
|
``
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user