autogit-plugin-confirmation
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i autogit-plugin-confirmation

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

10.4 kB

Total Files

8

Last publish

Collaborators

  • fabiospampinato