You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -58,12 +56,12 @@ echo "npm run run-if-changed" > .husky/post-rewrite
58
56
```
59
57
60
58
<details>
61
-
<summary><b>Just Git hooks:</b></summary>
59
+
<summary><b>Pure Git hooks:</b></summary>
62
60
```shell
63
-
echo"npm run run-if-changed"> .git/hooks/post-commit && chmod +x .git/hooks/post-commit
64
-
echo"npm run run-if-changed"> .git/hooks/post-checkout && chmod +x .git/hooks/post-checkout
65
-
echo"npm run run-if-changed"> .git/hooks/post-merge && chmod +x .git/hooks/post-merge
66
-
echo"npm run run-if-changed"> .git/hooks/post-rewrite && chmod +x .git/hooks/post-rewrite
61
+
echo"npm run run-if-changed">> .git/hooks/post-commit && chmod +x .git/hooks/post-commit
62
+
echo"npm run run-if-changed">> .git/hooks/post-checkout && chmod +x .git/hooks/post-checkout
63
+
echo"npm run run-if-changed">> .git/hooks/post-merge && chmod +x .git/hooks/post-merge
64
+
echo"npm run run-if-changed">> .git/hooks/post-rewrite && chmod +x .git/hooks/post-rewrite
67
65
```
68
66
</details>
69
67
@@ -89,7 +87,7 @@ Supported are any executables installed locally or globally via `npm` or Yarn as
89
87
90
88
> Using globally installed scripts is discouraged, since run-if-changed may not work for someone who doesn't have it installed.
91
89
92
-
`run-if-changed` is using [npm-which](https://github.com/timoxley/npm-which) to locate locally installed scripts. So in your `.run-if-changedrc` you can write:
90
+
`run-if-changed` is using [execa](https://github.com/sindresorhus/execa) to locate locally installed scripts and run them. So in your `.run-if-changedrc` you can just write and it would use the local version:
93
91
94
92
```json
95
93
{
@@ -108,14 +106,14 @@ If you use a dependency manager with a lock file like npm, Yarn, Composer, Bundl
0 commit comments