@@ -49,10 +49,10 @@ yarn add --dev husky @hkdobrev/run-if-changed
49
49
<summary ><b >Using <a href =" https://typicode.github.io/husky/ " ><code >husky</code ></a ></b ></summary >
50
50
51
51
<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
56
56
</code ></pre >
57
57
58
58
</details >
@@ -61,10 +61,10 @@ echo "npm run run-if-changed" > .husky/post-rewrite
61
61
<summary ><b >Just git hooks</b ></summary >
62
62
63
63
<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
68
68
</code ></pre >
69
69
70
70
</details >
0 commit comments