1.3.0 • Published 1 year ago

husky-hook v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

husky-hook

customize husky hooks, such as verify the commit message.

Install

with npm:

npm install husky-hook --save-dev

or with yarn:

yarn add husky-hook --dev

Usage

Enable husky-hook

with npm:

run:

npx husky-hook install

To automatically have husky hooks enabled after install, edit package.json

npm set-script prepare "husky-hook install"

or with yarn:

yarn husky-hook install

To automatically have Git hooks enabled after install, edit package.json

package is private:

// package.json: your package is private, you only need postinstall
{
  "private": true,
  "scripts": {
    "postinstall": "husky-hook install"
  }
}

package is public:

// package.json: your package is public
{
  "private": false,
  "scripts": {
    "postinstall": "husky-hook install",
    "prepublishOnly": "pinst --disable",
    "postpublish": "pinst --enable"
  }
}

Uninstall husky-hook

Remove "prepare/postinstall": "husky-hook install"from package.json and run:

npx husky-hook uninstall
npm uninstall husky-hook

Reference

https://typicode.github.io/husky/#/

1.3.0

1 year ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago