vorpal-rc

1.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i vorpal-rc

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • mxmxmx