.rc file support for Vorpal.js
$ npm i vorpal-rc
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();
Quick example :
$ npm i
$ cat ~/.awesomerc
hello Vorpal
exit
$ npm run example ~/.awesomerc
Hi Vorpal !
$
MIT