husky-hook
v1.3.0
Published
Husky hooks for scripts can be customized, such as verify commit message.
Downloads
19
Readme
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/#/