Skip to content

Commit

Permalink
docs: info about adding a new hook (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kordrad committed Feb 13, 2024
1 parent a9c6584 commit 1bbb922
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/how-to.md
@@ -1,5 +1,12 @@
# How To

## Adding a New Hook

Adding a hook is as simple as creating a file. This can be accomplished using your favorite editor, a script or a basic echo command. For example, on Linux/macOS:
```shell
echo "npm test" > .husky/pre-commit
```

## Startup files

Husky allows you to execute local commands before running hooks. It reads commands from these files:
Expand Down

0 comments on commit 1bbb922

Please sign in to comment.