Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

fabiospampinato/autogit-plugin-confirmation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A plugin for asking for confirmation before proceeding.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published