File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 4040 - [ Jest] ( #jest )
4141 - [ Semantic Release] ( #semantic-release )
4242 - [ Lint Staged] ( #lint-staged )
43+ - [ Source Control Hooks] ( #source-control-hooks )
44+ - [ Husky Example] ( #husky-example )
4345- [ License] ( #license )
4446- [ Maintenance] ( #maintenance )
4547
@@ -194,6 +196,36 @@ used with your custom command.
194196}
195197```
196198
199+ ### Source Control Hooks
200+
201+ This package includes a couple scripts designed to be run as part of your
202+ project's source control workflow. The most common workflow is using
203+ [ Husky] ( https://github.com/typicode/husky ) to manage
204+ [ Git hooks] ( https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks ) , but they
205+ should work with other solutions as well.
206+
207+ #### Husky Example
208+
209+ 1 . Install Husky
210+
211+ ``` sh
212+ yarn add -D husky
213+ ```
214+
215+ 2 . Configure hooks in ` package.json `
216+
217+ ``` json
218+ {
219+ "name" : " my-package" ,
220+ "husky" : {
221+ "hooks" : {
222+ "pre-commit" : " hover-scripts pre-commit" ,
223+ "commit-msg" : " hover-scripts commit-msg"
224+ }
225+ }
226+ }
227+ ```
228+
197229## License
198230
199231MIT
You can’t perform that action at this time.
0 commit comments