@evilmartians/lefthook-installer 1.9.3 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ A Git hooks manager for Node.js, Ruby, Python and many other types of projects.
|
|
|
14
14
|
* **Powerful.** It allows to control execution and files you pass to your commands.
|
|
15
15
|
* **Simple.** It is single dependency-free binary which can work in any environment.
|
|
16
16
|
|
|
17
|
+
📖 [Documentation][documentation]
|
|
18
|
+
|
|
17
19
|
📖 [Read the introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)
|
|
18
20
|
|
|
19
21
|
<a href="https://evilmartians.com/?utm_source=lefthook">
|
|
@@ -45,7 +47,7 @@ For **Python**:
|
|
|
45
47
|
pip install lefthook
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
**[Installation guide]
|
|
50
|
+
**[Installation guide][installation]** with more ways to install lefthook: [apt][install-apt], [brew][install-brew], [winget][install-winget], and others.
|
|
49
51
|
|
|
50
52
|
## Usage
|
|
51
53
|
|
|
@@ -66,15 +68,15 @@ git add -A && git commit -m '...'
|
|
|
66
68
|
|
|
67
69
|
#### More details
|
|
68
70
|
|
|
69
|
-
- [**Configuration**]
|
|
70
|
-
- [**Usage**]
|
|
71
|
-
- [**Discussions**]
|
|
71
|
+
- [**Configuration**][configuration] for `lefthook.yml` config options.
|
|
72
|
+
- [**Usage**][usage] for **lefthook** CLI options, supported ENVs, and usage tips.
|
|
73
|
+
- [**Discussions**][discussion] for questions, ideas, suggestions.
|
|
72
74
|
<!-- - [**Wiki**](https://github.com/evilmartians/lefthook/wiki) for guides, examples, and benchmarks. -->
|
|
73
75
|
|
|
74
76
|
## Why Lefthook
|
|
75
77
|
|
|
76
78
|
* ### **Parallel execution**
|
|
77
|
-
Gives you more speed. [
|
|
79
|
+
Gives you more speed. [docs][config-parallel]
|
|
78
80
|
|
|
79
81
|
```yml
|
|
80
82
|
pre-push:
|
|
@@ -82,7 +84,7 @@ pre-push:
|
|
|
82
84
|
```
|
|
83
85
|
|
|
84
86
|
* ### **Flexible list of files**
|
|
85
|
-
If you want your own list. [Custom]
|
|
87
|
+
If you want your own list. [Custom][config-files] and [prebuilt][config-run] examples.
|
|
86
88
|
|
|
87
89
|
```yml
|
|
88
90
|
pre-commit:
|
|
@@ -122,7 +124,7 @@ pre-commit:
|
|
|
122
124
|
|
|
123
125
|
* ### **Run scripts**
|
|
124
126
|
|
|
125
|
-
If oneline commands are not enough, you can execute files. [
|
|
127
|
+
If oneline commands are not enough, you can execute files. [docs][config-scripts]
|
|
126
128
|
|
|
127
129
|
```yml
|
|
128
130
|
commit-msg:
|
|
@@ -132,22 +134,26 @@ commit-msg:
|
|
|
132
134
|
```
|
|
133
135
|
|
|
134
136
|
* ### **Tags**
|
|
135
|
-
If you want to control a group of commands. [
|
|
137
|
+
If you want to control a group of commands. [docs][config-tags]
|
|
136
138
|
|
|
137
139
|
```yml
|
|
138
140
|
pre-push:
|
|
139
141
|
commands:
|
|
140
142
|
packages-audit:
|
|
141
|
-
tags:
|
|
142
|
-
|
|
143
|
+
tags:
|
|
144
|
+
- frontend
|
|
145
|
+
- linters
|
|
146
|
+
run: yarn lint
|
|
143
147
|
gems-audit:
|
|
144
|
-
tags:
|
|
148
|
+
tags:
|
|
149
|
+
- backend
|
|
150
|
+
- security
|
|
145
151
|
run: bundle audit
|
|
146
152
|
```
|
|
147
153
|
|
|
148
154
|
* ### **Support Docker**
|
|
149
155
|
|
|
150
|
-
If you are in the Docker environment. [
|
|
156
|
+
If you are in the Docker environment. [docs][config-run]
|
|
151
157
|
|
|
152
158
|
```yml
|
|
153
159
|
pre-commit:
|
|
@@ -158,7 +164,7 @@ pre-commit:
|
|
|
158
164
|
|
|
159
165
|
* ### **Local config**
|
|
160
166
|
|
|
161
|
-
If you a frontend/backend developer and want to skip unnecessary commands or override something into Docker. [
|
|
167
|
+
If you a frontend/backend developer and want to skip unnecessary commands or override something into Docker. [docs][usage-local-config]
|
|
162
168
|
|
|
163
169
|
```yml
|
|
164
170
|
# lefthook-local.yml
|
|
@@ -194,29 +200,30 @@ fixer:
|
|
|
194
200
|
$ lefthook run fixer
|
|
195
201
|
```
|
|
196
202
|
|
|
197
|
-
* ### **
|
|
203
|
+
* ### **Control output**
|
|
198
204
|
|
|
199
|
-
|
|
205
|
+
You can control what lefthook prints with [output][config-output] option.
|
|
200
206
|
|
|
201
207
|
```yml
|
|
202
|
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
208
|
+
output:
|
|
209
|
+
- execution
|
|
210
|
+
- failure
|
|
205
211
|
```
|
|
206
212
|
|
|
207
213
|
----
|
|
208
214
|
|
|
209
215
|
### Guides
|
|
210
216
|
|
|
211
|
-
* [Install with Node.js]
|
|
212
|
-
* [Install with Ruby]
|
|
213
|
-
* [Install with Homebrew]
|
|
214
|
-
* [Install with Winget]
|
|
215
|
-
* [Install for Debian-based Linux]
|
|
216
|
-
* [Install for RPM-based Linux]
|
|
217
|
-
* [Install for Arch Linux]
|
|
218
|
-
* [
|
|
219
|
-
* [
|
|
217
|
+
* [Install with Node.js][install-node]
|
|
218
|
+
* [Install with Ruby][install-ruby]
|
|
219
|
+
* [Install with Homebrew][install-brew]
|
|
220
|
+
* [Install with Winget][install-winget]
|
|
221
|
+
* [Install for Debian-based Linux][install-apt]
|
|
222
|
+
* [Install for RPM-based Linux][install-rpm]
|
|
223
|
+
* [Install for Arch Linux][install-arch]
|
|
224
|
+
* [Install for Alpine Linux][install-alpine]
|
|
225
|
+
* [Usage][usage]
|
|
226
|
+
* [Configuration][configuration]
|
|
220
227
|
<!-- * [Troubleshooting](https://github.com/evilmartians/lefthook/wiki/Troubleshooting) -->
|
|
221
228
|
|
|
222
229
|
<!-- ### Migrate from -->
|
|
@@ -225,8 +232,8 @@ skip_output:
|
|
|
225
232
|
<!-- * [Overcommit](https://github.com/evilmartians/lefthook/wiki/Migration-from-overcommit) -->
|
|
226
233
|
|
|
227
234
|
### Examples
|
|
228
|
-
|
|
229
|
-
|
|
235
|
+
|
|
236
|
+
Check [examples][examples]
|
|
230
237
|
|
|
231
238
|
<!-- ### Benchmarks -->
|
|
232
239
|
<!-- * [vs Overcommit](https://github.com/evilmartians/lefthook/wiki/Benchmark-lefthook-vs-overcommit) -->
|
|
@@ -243,3 +250,28 @@ skip_output:
|
|
|
243
250
|
* [Automatically linting docker containers](https://dev.to/nitzano/linting-docker-containers-2lo6?utm_source=lefthook)
|
|
244
251
|
* [Smooth PostgreSQL upgrades in DockerDev environments with Lefthook](https://dev.to/palkan_tula/smooth-postgresql-upgrades-in-dockerdev-environments-with-lefthook-203k?utm_source=lefthook)
|
|
245
252
|
* [Lefthook for React/React Native apps](https://blog.logrocket.com/deep-dive-into-lefthook-react-native?utm_source=lefthook)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
[documentation]: https://evilmartians.github.io/lefthook/
|
|
256
|
+
[configuration]: https://evilmartians.github.io/lefthook/configuration/index.html
|
|
257
|
+
[examples]: https://evilmartians.github.io/lefthook/examples/index.html
|
|
258
|
+
[installation]: https://evilmartians.github.io/lefthook/installation/
|
|
259
|
+
[usage]: https://evilmartians.github.io/lefthook/usage/index.html
|
|
260
|
+
[discussion]: https://github.com/evilmartians/lefthook/discussions
|
|
261
|
+
[install-apt]: https://evilmartians.github.io/lefthook/installation/deb.html
|
|
262
|
+
[install-ruby]: https://evilmartians.github.io/lefthook/installation/ruby.html
|
|
263
|
+
[install-node]: https://evilmartians.github.io/lefthook/installation/node.html
|
|
264
|
+
[install-brew]: https://evilmartians.github.io/lefthook/installation/homebrew.html
|
|
265
|
+
[install-winget]: https://evilmartians.github.io/lefthook/installation/winget.html
|
|
266
|
+
[install-rpm]: https://evilmartians.github.io/lefthook/installation/rpm.html
|
|
267
|
+
[install-arch]: https://evilmartians.github.io/lefthook/installation/arch.html
|
|
268
|
+
[install-alpine]: https://evilmartians.github.io/lefthook/installation/alpine.html
|
|
269
|
+
[config-parallel]: https://evilmartians.github.io/lefthook/configuration/parallel.html
|
|
270
|
+
[config-files]: https://evilmartians.github.io/lefthook/configuration/files.html
|
|
271
|
+
[config-glob]: https://evilmartians.github.io/lefthook/configuration/glob.html
|
|
272
|
+
[config-run]: https://evilmartians.github.io/lefthook/configuration/run.html
|
|
273
|
+
[config-scripts]: https://evilmartians.github.io/lefthook/configuration/Scripts.html
|
|
274
|
+
[config-tags]: https://evilmartians.github.io/lefthook/configuration/tags.html
|
|
275
|
+
[config-skip_output]: https://evilmartians.github.io/lefthook/configuration/skip_output.html
|
|
276
|
+
[config-output]: https://evilmartians.github.io/lefthook/configuration/output.html
|
|
277
|
+
[usage-local-config]: https://evilmartians.github.io/lefthook/usage/tips.html#local-config
|