
hook-cli
A small hook cli
·
Report Bug
·
Request Feature
·
About The Project
A small hook cli that can be used with for example husky.
Disclaimer
I know that most of this stuff is already solved by some awesome tools. So this is really just a CLI playground for me.
Installation
npm i -D @beuluis/hook-cli
Usage
-
Add script to package.json
{
"scripts": {
"hook-cli": "hook-cli"
}
}
-
start using the hooks in .husky
npm run hook-cli -- [command] [...]
Commands
checkForVulnerabilities
Runs a package audit and collects the results
Option | Description | Type | default |
---|
-m , --package-manager | The package manager you want to use | yarn , npm | npm |
-l , --audit-level | The severity of the vulnerabilities what the script will report | info , low , moderate , high , critical | critical |
-n , --no-fail | If true only prints warning messages and do not exit with not zero code | boolean | false |
-p , --prod | If true only run audit for prod dependencies and skip dev ones | boolean | false |
Example usage
npm run hook-cli -- checkForVulnerabilities
npm run hook-cli -- checkForVulnerabilities --package-manager yarn
npm run hook-cli -- checkForVulnerabilities --audit-level low
npm run hook-cli -- checkForVulnerabilities --no-fail
npm run hook-cli -- checkForVulnerabilities --prod
npm run hook-cli -- checkForVulnerabilities -l high -m yarn -n -p
Useful
Print help page for command
npm run hook-cli -- [command] --help
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Contact
Luis Beu - me@luisbeu.de