google_forms/Husky_installation.txt

29 lines
527 B
Plaintext
Raw Permalink Normal View History

2024-08-08 08:48:21 +00:00
1.Initialize a Git repository
git init
2.Install Husky as a development dependency:
npm install husky --save-dev
3.Enable Husky in your project:
npx husky install
4.Add the following script to your package.json to automatically install Husky hooks after installing dependencies:
{
"scripts": {
"prepare": "husky install"
}
}
5.Add a pre-commit hook:
npx husky add .husky/pre-commit "npm test"
Pre-commit file
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm test
6.Customize pre-commit
7.Customize package.json