1.1.0 • Published 8 years ago

vorpal-rc v1.1.0

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

vorpal-rc

Travis Codecov Commitizen friendly

.rc file support for Vorpal.js

Installation

$ npm i vorpal-rc

Usage

import Vorpal from 'vorpal';
import rc from 'vorpal-rc';

const vorpal = new Vorpal();

// first declare your commands
vorpal
  .command('hello <your-name>')
  .action(function (args, callback) {
    this.log('Hi %s !', args['your-name']);
    callback();
  });

// execute ~/.awesomerc then show command line
vorpal
  .use(rc, path.join(os.homedir(), '.awesomerc'))
  .delimiter('example>')
  .show();

Example

Quick example :

$ npm i
$ cat ~/.awesomerc
hello Vorpal
exit
$ npm run example ~/.awesomerc
Hi Vorpal !
$

License

MIT

1.1.0

8 years ago

1.0.0

8 years ago