Rework of https://github.com/jmtoball/cli-confirm
Basically a script that you can call from the cli itself, or within other NPM scripts to confirm an action. Comes handy when you want to add manual confirmation before doing something dangerous.
- Getting started
- Usage
- Contributing
- License
- Why a fork?
- Vulnerability disclosure
- Contributors and maintainers
- [ABOUT UNLY]
yarn add -D @unly/cli-confirm
Example of package.json
[…]
"scripts" {
"self-destruct-servers": "cli-confirm \"Do you really want to blow up the servers?\" && yarn destroy:servers",
"destroy:servers": "echo 'servers decommissioned permanently'"
}
[…]
Which would produce the following output:
$ yarn self-destruct-server
Do you really want to blow up the servers? n
$ yarn self-destruct-server
Do you really want to blow up the servers? y
servers decommissioned permanently
$ yarn self-destruct-server
Do you really want to blow up the servers? yes
servers decommissioned permanently
We gladly accept PRs, but please open an issue first so we can discuss it beforehand.
yarn lint
yarn test # Run a manual test which calls our src/index.js
yarn releaseAndPublish # Shortcut - Will prompt for bump version, commit, create git tag, push commit/tag and publish to NPM
yarn release # Will prompt for bump version, commit, create git tag, push commit/tag
npm publish # Will publish to NPM
MIT
The script itself hasn't changed much (additionally allows yes
as well as y
input), license was updated from ISC to MIT.
As it is a bad practice to rely on software that isn't maintained, nor should be updated, we made our own cli-confirm
.
It's basically safer as we don't know who could update the original https://github.com/jmtoball/cli-confirm with additional code.
This project is being maintained by:
- [Unly] Ambroise Dhenain (Vadorequest) (active)
Unly is a socially responsible company, fighting inequality and facilitating access to higher education. Unly is committed to making education more inclusive, through responsible funding for students. We provide technological solutions to help students find the necessary funding for their studies.
We proudly participate in many TechForGood initiatives. To support and learn more about our actions to make education accessible, visit :
- https://twitter.com/UnlyEd
- https://www.facebook.com/UnlyEd/
- https://www.linkedin.com/company/unly
- Interested to work with us?
Tech tips and tricks from our CTO on our Medium page!
#TECHFORGOOD #EDUCATIONFORALL