1.0.2 • Published 5 years ago

autogit-plugin-confirmation v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Autogit Plugin - Confirmation

A plugin for asking for confirmation before proceeding.

It's useful when you want to have a final saying before executing important commands.

Install

npm install --save autogit-plugin-confirmation

Usage

Options

This plugin uses the following options object:

{
  message: 'Are you sure you want to proceed: (Y/n)', // The confirmation message
  defaultValue: 'Y' // Default confirmation value if none is provided
}

If the provided confirmation value starts with a Y or y we well proceed, otherwise an exception will be thrown and the following plugins won't be executed.

Configuration

Add this plugin to a command:

const confirmation = require ( 'autogit-plugin-confirmation' );

module.exports = {
  commands: {
    'my-command': [
      confirmation ({
        message: 'Press enter to confirm:'
      })
    ]
  }
}

License

MIT © Fabio Spampinato