Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fabiospampinato/autogit-plugin-confirmation

A plugin for asking for confirmation before proceeding.
https://github.com/fabiospampinato/autogit-plugin-confirmation

autogit confirmation plugin

Last synced: 3 months ago
JSON representation

A plugin for asking for confirmation before proceeding.

Awesome Lists containing this project

README

        

# 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

```sh
npm install --save autogit-plugin-confirmation
```

## Usage

#### Options

This plugin uses the following options object:

```js
{
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:

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

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

## License

MIT © Fabio Spampinato