Skip to content

Commit 7d357c4

Browse files
committed
fix hooks setup instructions and project hooks
1 parent 2ca1d44 commit 7d357c4

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

.husky/post-checkout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npm run run-if-changed
1+
npx run-if-changed

.husky/post-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npm run run-if-changed
1+
npx run-if-changed

.husky/post-merge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npm run run-if-changed
1+
npx run-if-changed

.husky/post-rewrite

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npm run run-if-changed
1+
npx run-if-changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lint-staged && npm test
1+
lint-staged --quiet && npm test

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ yarn add --dev husky @hkdobrev/run-if-changed
4949
<summary><b>Using <a href="https://typicode.github.io/husky/"><code>husky</code></a></b></summary>
5050

5151
<pre><code class="language-shell">
52-
echo "npm run run-if-changed" > .husky/post-commit
53-
echo "npm run run-if-changed" > .husky/post-checkout
54-
echo "npm run run-if-changed" > .husky/post-merge
55-
echo "npm run run-if-changed" > .husky/post-rewrite
52+
echo "npx run-if-changed" > .husky/post-commit
53+
echo "npx run-if-changed" > .husky/post-checkout
54+
echo "npx run-if-changed" > .husky/post-merge
55+
echo "npx run-if-changed" > .husky/post-rewrite
5656
</code></pre>
5757

5858
</details>
@@ -61,10 +61,10 @@ echo "npm run run-if-changed" > .husky/post-rewrite
6161
<summary><b>Just git hooks</b></summary>
6262

6363
<pre><code class="language-shell">
64-
echo "npm run run-if-changed" >> .git/hooks/post-commit && chmod +x .git/hooks/post-commit
65-
echo "npm run run-if-changed" >> .git/hooks/post-checkout && chmod +x .git/hooks/post-checkout
66-
echo "npm run run-if-changed" >> .git/hooks/post-merge && chmod +x .git/hooks/post-merge
67-
echo "npm run run-if-changed" >> .git/hooks/post-rewrite && chmod +x .git/hooks/post-rewrite
64+
echo "npx run-if-changed" >> .git/hooks/post-commit && chmod +x .git/hooks/post-commit
65+
echo "npx run-if-changed" >> .git/hooks/post-checkout && chmod +x .git/hooks/post-checkout
66+
echo "npx run-if-changed" >> .git/hooks/post-merge && chmod +x .git/hooks/post-merge
67+
echo "npx run-if-changed" >> .git/hooks/post-rewrite && chmod +x .git/hooks/post-rewrite
6868
</code></pre>
6969

7070
</details>

0 commit comments

Comments
 (0)