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
echo "npm run run-if-changed" > .husky/post-commit
53
53
echo "npm run run-if-changed" > .husky/post-checkout
54
54
echo "npm run run-if-changed" > .husky/post-merge
55
55
echo "npm run run-if-changed" > .husky/post-rewrite
56
-
```
56
+
</code></pre>
57
57
58
58
<details>
59
-
<summary><b>Pure Git hooks</b></summary>
59
+
<summary><b>Just git hooks</b></summary>
60
60
61
-
```shell
61
+
<pre><codeclass="language-shell">
62
62
echo "npm run run-if-changed" >> .git/hooks/post-commit && chmod +x .git/hooks/post-commit
63
63
echo "npm run run-if-changed" >> .git/hooks/post-checkout && chmod +x .git/hooks/post-checkout
64
64
echo "npm run run-if-changed" >> .git/hooks/post-merge && chmod +x .git/hooks/post-merge
65
65
echo "npm run run-if-changed" >> .git/hooks/post-rewrite && chmod +x .git/hooks/post-rewrite
66
-
```
66
+
</code></pre>
67
67
68
68
</details>
69
69
@@ -89,13 +89,13 @@ Supported are any executables installed locally or globally via `npm` or Yarn as
89
89
90
90
> Using globally installed scripts is discouraged, since run-if-changed may not work for someone who doesn't have it installed.
91
91
92
-
`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:
92
+
`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
93
94
-
```json
94
+
<pre><codeclass="language-json">
95
95
{
96
96
"src": "webpack"
97
97
}
98
-
```
98
+
</code></pre>
99
99
100
100
Sequences of commands are supported. Pass an array of commands instead of a single one and they will run sequentially.
101
101
@@ -110,76 +110,76 @@ Here's example configuration of `run-if-changed`:
0 commit comments