vorpal-as-default
v0.0.2
Published
Plugin for Vorpal that run defined command if no commands where specified previously
Downloads
5
Maintainers
Readme
vorpal-as-default
Proposal
This plugin is useful to trigger Vorpal task in case it runs without any specificly defined task. For instance you can use it to bootstrap your application or do initial setup.
Installation
$ npm install vorpal-as-default --save
Usage
import Vorpal from 'vorpal';
import asDefault from 'vorpal-as-default'
const vorpal = Vorpal();
vorpal
.command('setup')
.action(function (args, next) {
this.log('setup task');
next();
});
vorpal
.show()
.parse(process.argv)
.use(asDefault, 'setup');