0.1.4 • Published 8 years ago

vnjson-cmd v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

vnjson-cmd

commander for bash

Install

npm install --save vnjson-cmd
``

### Usage
__`package.json`__
```json
{
  "name": "my-cli-util",
  "version": "0.5.7",
  "main": "./index.js",

  "bin": {
    "my-cli-util": "./bin/my-cli-util"
  },

  "dependencies": {
    "vnjson-cmd": "^0.1.1"
  }
}
+my-cli-util
  +node_modules
  +bin
    -my-cli-util
  -index.js
  -package.json

my-cli-util

#!/usr/bin/env node
const pkg = require('../package');
process.title = `${pkg.name}@${pkg.version}`;

const
  index                         = require('../index'),
  vnjs                          = require('vnjson-cmd');


vnjs.on('build', function(options){
    console.log('Собрать', options);

});

vnjs.on('init', function(options){
    index("init", options);
})
vnjs.on('start', function(options){
     index("start", options.p);
})
vnjs.on('help', function(){
  console.log('--help');
});

vnjs.parse();

License

MIT license (MIT)