Awesome
vorpal-rc
.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