Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/fabiospampinato/autogit-plugin-confirmation
- Owner: fabiospampinato
- License: mit
- Archived: true
- Created: 2018-10-18T13:57:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-24T20:28:03.000Z (almost 5 years ago)
- Last Synced: 2024-06-24T06:44:44.704Z (4 months ago)
- Topics: autogit, confirmation, plugin
- Language: TypeScript
- Size: 15.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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