Skip to content

Commit 6641a97

Browse files
jrolfsgithub-actions[bot]
authored andcommitted
docs(readme): document source control hook scripts
1 parent 82bcd7d commit 6641a97

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
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

199231
MIT

0 commit comments

Comments
 (0)