JSPM

  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q45903F
  • License MIT

A small hook cli that can be used with for example husky

Package Exports

  • @beuluis/hook-cli
  • @beuluis/hook-cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@beuluis/hook-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Contributors Forks Stargazers Issues


Logo

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

Run commands. For example using the hooks in .husky

```bash
npx 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
npx hook-cli checkForVulnerabilities
npx hook-cli checkForVulnerabilities --package-manager yarn
npx hook-cli checkForVulnerabilities --audit-level low
npx hook-cli checkForVulnerabilities --no-fail
npx hook-clicheckForVulnerabilities --prod
npx hook-cli checkForVulnerabilities -l high -m yarn -n -p

Useful

  • Print help page for command
npx hook-cli [command] --help
  • Test command during development
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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Luis Beu - me@luisbeu.de