vorpal-as-default

Plugin for Vorpal that run defined command if no commands where specified previously

Usage no npm install needed!

<script type="module">
  import vorpalAsDefault from 'https://cdn.skypack.dev/vorpal-as-default';
</script>

README

vorpal-as-default

Commitizen friendly Code Climate Test Coverage Issue Count

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');