Skip to content

Commit

Permalink
fix hooks setup instructions and project hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
hkdobrev committed Dec 14, 2024
1 parent 2ca1d44 commit 7d357c4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run run-if-changed
npx run-if-changed
2 changes: 1 addition & 1 deletion .husky/post-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run run-if-changed
npx run-if-changed
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run run-if-changed
npx run-if-changed
2 changes: 1 addition & 1 deletion .husky/post-rewrite
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run run-if-changed
npx run-if-changed
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lint-staged && npm test
lint-staged --quiet && npm test
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ yarn add --dev husky @hkdobrev/run-if-changed
<summary><b>Using <a href="https://typicode.github.io/husky/"><code>husky</code></a></b></summary>

<pre><code class="language-shell">
echo "npm run run-if-changed" > .husky/post-commit
echo "npm run run-if-changed" > .husky/post-checkout
echo "npm run run-if-changed" > .husky/post-merge
echo "npm run run-if-changed" > .husky/post-rewrite
echo "npx run-if-changed" > .husky/post-commit
echo "npx run-if-changed" > .husky/post-checkout
echo "npx run-if-changed" > .husky/post-merge
echo "npx run-if-changed" > .husky/post-rewrite
</code></pre>

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

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

</details>
Expand Down

0 comments on commit 7d357c4

Please sign in to comment.