Skip to content

Commit fd9390e

Browse files
committed
noot
1 parent 28ba18f commit fd9390e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

site/docs/index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ <h1><a href="/">githook.sh</a> docs</h1>
2020
<div>
2121
<b>integration:</b>
2222
<a href="#ci">ci/cd</a> ·
23-
<a href="#npm">npm</a> ·
23+
<a href="#package-json">package.json</a> ·
24+
<a href="#makefile">makefile</a> ·
2425
<a href="#husky">husky</a> ·
2526
<a href="#languages">languages</a>
2627
</div>
@@ -98,14 +99,21 @@ <h2 id="ci">ci/cd and docker</h2>
9899
# docker
99100
ENV GITHOOK=0</pre>
100101

101-
<h2 id="npm">package.json integration</h2>
102+
<h2 id="package-json">package.json integration</h2>
102103
<p>auto-install hooks when developers run <code>npm install</code>:</p>
103104
<p><strong>npm / pnpm / bun:</strong></p>
104105
<pre>npm pkg set scripts.prepare="./.githook.sh install"</pre>
105106
<p><strong>yarn:</strong></p>
106107
<pre>npm pkg set scripts.postinstall="./.githook.sh install"</pre>
107108
<p>yarn uses <code>postinstall</code> instead of <code>prepare</code>.</p>
108109

110+
<h2 id="makefile">makefile integration</h2>
111+
<p>add a target for installing hooks:</p>
112+
<pre>.PHONY: prepare
113+
prepare:
114+
./.githook.sh install</pre>
115+
<p>run <code>make prepare</code> after cloning.</p>
116+
109117
<h2 id="husky">migrating from husky</h2>
110118
<p>hooks are automatically migrated during setup if <code>.husky/</code> exists. to migrate manually:</p>
111119
<pre>./.githook.sh migrate husky</pre>

0 commit comments

Comments
 (0)