lefthook-linux-arm64 0.0.2
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 +213 -0
- package/bin/lefthook +0 -0
- package/package.json +21 -0
package/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Lefthook
|
|
4
|
+
|
|
5
|
+
> The fastest polyglot Git hooks manager out there
|
|
6
|
+
|
|
7
|
+
<img align="right" width="147" height="100" title="Lefthook logo"
|
|
8
|
+
src="./logo_sign.svg">
|
|
9
|
+
|
|
10
|
+
Fast and powerful Git hooks manager for Node.js, Ruby or any other type of projects.
|
|
11
|
+
|
|
12
|
+
* **Fast.** It is written in Go. Can run commands in parallel.
|
|
13
|
+
* **Powerful.** With a few lines in the config you can check only the changed files on `pre-push` hook.
|
|
14
|
+
* **Simple.** It is single dependency-free binary which can work in any environment.
|
|
15
|
+
|
|
16
|
+
📖 [Read the introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)
|
|
17
|
+
|
|
18
|
+
```yml
|
|
19
|
+
# On `git push` lefthook will run spelling and links check for all of the changed files
|
|
20
|
+
pre-push:
|
|
21
|
+
parallel: true
|
|
22
|
+
commands:
|
|
23
|
+
spelling:
|
|
24
|
+
files: git diff --name-only HEAD @{push}
|
|
25
|
+
glob: "*.md"
|
|
26
|
+
run: npx yaspeller {files}
|
|
27
|
+
check-links:
|
|
28
|
+
files: git diff --name-only HEAD @{push}
|
|
29
|
+
glob: "*.md"
|
|
30
|
+
run: npx markdown-link-check {files}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
<a href="https://evilmartians.com/?utm_source=lefthook">
|
|
34
|
+
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
Choose your environment:
|
|
39
|
+
|
|
40
|
+
* **[Node.js](./docs/node.md)**
|
|
41
|
+
* **[Ruby](./docs/ruby.md)**
|
|
42
|
+
* [Other environments](./docs/other.md)
|
|
43
|
+
|
|
44
|
+
Then you can find all Lefthook features in [the full guide](./docs/full_guide.md) and explore [wiki](https://github.com/evilmartians/lefthook/wiki).
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
## Why Lefthook
|
|
49
|
+
|
|
50
|
+
* ### **Parallel execution**
|
|
51
|
+
If you want more speed. [Example](./docs/full_guide.md#parallel-execution)
|
|
52
|
+
|
|
53
|
+
```yml
|
|
54
|
+
pre-push:
|
|
55
|
+
parallel: true
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
* ### **Flexible list of files**
|
|
59
|
+
If you want your own list. [Custom](./docs/full_guide.md#custom-file-list) and [prebuilt](./docs/full_guide.md#select-specific-file-groups) examples.
|
|
60
|
+
|
|
61
|
+
```yml
|
|
62
|
+
pre-commit:
|
|
63
|
+
commands:
|
|
64
|
+
frontend-linter:
|
|
65
|
+
run: yarn eslint {staged_files}
|
|
66
|
+
backend-linter:
|
|
67
|
+
run: bundle exec rubocop --force-exclusion {all_files}
|
|
68
|
+
frontend-style:
|
|
69
|
+
files: git diff --name-only HEAD @{push}
|
|
70
|
+
run: yarn stylelint {files}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
* ### **Glob and regexp filters**
|
|
74
|
+
If you want to filter list of files. You could find more glob pattern examples [here](https://github.com/gobwas/glob#example).
|
|
75
|
+
|
|
76
|
+
```yml
|
|
77
|
+
pre-commit:
|
|
78
|
+
commands:
|
|
79
|
+
backend-linter:
|
|
80
|
+
glob: "*.rb" # glob filter
|
|
81
|
+
exclude: "application.rb|routes.rb" # regexp filter
|
|
82
|
+
run: bundle exec rubocop --force-exclusion {all_files}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
* ### **Execute in sub-directory**
|
|
86
|
+
If you want to execute the commands in a relative path
|
|
87
|
+
|
|
88
|
+
```yml
|
|
89
|
+
pre-commit:
|
|
90
|
+
commands:
|
|
91
|
+
backend-linter:
|
|
92
|
+
root: "api/" # Careful to have only trailing slash
|
|
93
|
+
glob: "*.rb" # glob filter
|
|
94
|
+
run: bundle exec rubocop {all_files}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
* ### **Run scripts**
|
|
98
|
+
|
|
99
|
+
If oneline commands are not enough, you can execute files. [Example](./docs/full_guide.md#bash-script-example).
|
|
100
|
+
|
|
101
|
+
```yml
|
|
102
|
+
commit-msg:
|
|
103
|
+
scripts:
|
|
104
|
+
"template_checker":
|
|
105
|
+
runner: bash
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
* ### **Tags**
|
|
109
|
+
If you want to control a group of commands. [Example](./docs/full_guide.md#skipping-commands-by-tags).
|
|
110
|
+
|
|
111
|
+
```yml
|
|
112
|
+
pre-push:
|
|
113
|
+
commands:
|
|
114
|
+
packages-audit:
|
|
115
|
+
tags: frontend security
|
|
116
|
+
run: yarn audit
|
|
117
|
+
gems-audit:
|
|
118
|
+
tags: backend security
|
|
119
|
+
run: bundle audit
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
* ### **Support Docker**
|
|
123
|
+
|
|
124
|
+
If you are in the Docker environment. [Example](./docs/full_guide.md#referencing-commands-from-lefthookyml).
|
|
125
|
+
|
|
126
|
+
```yml
|
|
127
|
+
pre-commit:
|
|
128
|
+
scripts:
|
|
129
|
+
"good_job.js":
|
|
130
|
+
runner: docker run -it --rm <container_id_or_name> {cmd}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
* ### **Local config**
|
|
134
|
+
|
|
135
|
+
If you a frontend/backend developer and want to skip unnecessary commands or override something into Docker. [Description](./docs/full_guide.md#local-config).
|
|
136
|
+
|
|
137
|
+
```yml
|
|
138
|
+
# lefthook-local.yml
|
|
139
|
+
pre-push:
|
|
140
|
+
exclude_tags:
|
|
141
|
+
- frontend
|
|
142
|
+
commands:
|
|
143
|
+
packages-audit:
|
|
144
|
+
skip: true
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
* ### **Direct control**
|
|
148
|
+
|
|
149
|
+
If you want to run hooks group directly.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
$ lefthook run pre-commit
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
* ### **Your own tasks**
|
|
156
|
+
|
|
157
|
+
If you want to run specific group of commands directly.
|
|
158
|
+
|
|
159
|
+
```yml
|
|
160
|
+
fixer:
|
|
161
|
+
commands:
|
|
162
|
+
ruby-fixer:
|
|
163
|
+
run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files}
|
|
164
|
+
js-fixer:
|
|
165
|
+
run: yarn eslint --fix {staged_files}
|
|
166
|
+
```
|
|
167
|
+
```bash
|
|
168
|
+
$ lefthook run fixer
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
* ### **Optional output**
|
|
172
|
+
If you don't want to see supporting information:
|
|
173
|
+
```yml
|
|
174
|
+
skip_output:
|
|
175
|
+
- meta #(version and which hook running)
|
|
176
|
+
- success #(output from runners with exit code 0)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Table of contents:
|
|
182
|
+
|
|
183
|
+
### Guides
|
|
184
|
+
* [Node.js](./docs/node.md)
|
|
185
|
+
* [Ruby](./docs/ruby.md)
|
|
186
|
+
* [Other environments](./docs/other.md)
|
|
187
|
+
* [Full features guide](./docs/full_guide.md)
|
|
188
|
+
* [Troubleshooting](https://github.com/evilmartians/lefthook/wiki/Troubleshooting)
|
|
189
|
+
|
|
190
|
+
### Migrate from
|
|
191
|
+
* [Husky](https://github.com/evilmartians/lefthook/wiki/Migration-from-husky)
|
|
192
|
+
* [Husky and lint-staged](https://github.com/evilmartians/lefthook/wiki/Migration-from-husky-with-lint-staged)
|
|
193
|
+
* [Overcommit](https://github.com/evilmartians/lefthook/wiki/Migration-from-overcommit)
|
|
194
|
+
|
|
195
|
+
### Examples
|
|
196
|
+
* [Simple script](https://github.com/evilmartians/lefthook/tree/master/examples/scripts)
|
|
197
|
+
* [Full features](https://github.com/evilmartians/lefthook/tree/master/examples/complete)
|
|
198
|
+
|
|
199
|
+
### Benchmarks
|
|
200
|
+
* [vs Overcommit](https://github.com/evilmartians/lefthook/wiki/Benchmark-lefthook-vs-overcommit)
|
|
201
|
+
* [vs pre-commit](https://github.com/evilmartians/lefthook/wiki/Benchmark-lefthook-vs-pre-commit)
|
|
202
|
+
|
|
203
|
+
### Comparison list
|
|
204
|
+
* [vs Overcommit, Husky, pre-commit](https://github.com/evilmartians/lefthook/wiki/Comparison-with-other-solutions)
|
|
205
|
+
|
|
206
|
+
### Articles
|
|
207
|
+
* [Lefthook: Knock your team’s code back into shape](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)
|
|
208
|
+
* [Lefthook + Crystalball](https://evilmartians.com/chronicles/lefthook-crystalball-and-git-magic?utm_source=lefthook)
|
|
209
|
+
* [Keeping OSS documentation in check with docsify, Lefthook, and friends](https://evilmartians.com/chronicles/keeping-oss-documentation-in-check-with-docsify-lefthook-and-friends?utm_source=lefthook)
|
|
210
|
+
* [Automatically linting docker containers](https://dev.to/nitzano/linting-docker-containers-2lo6?utm_source=lefthook)
|
|
211
|
+
* [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)
|
|
212
|
+
* [Lefthook for React/React Native apps](https://blog.logrocket.com/deep-dive-into-lefthook-react-native?utm_source=lefthook)
|
|
213
|
+
|
package/bin/lefthook
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lefthook-linux-arm64",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "The Linux ARM 64-bit binary for lefthook, git hooks manager.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"lefthook": "bin/lefthook"
|
|
7
|
+
},
|
|
8
|
+
"preferUnplugged": false,
|
|
9
|
+
"repository": "https://github.com/evilmartians/lefthook",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/evilmartians/lefthook/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/evilmartians/lefthook#readme",
|
|
15
|
+
"os": [
|
|
16
|
+
"linux"
|
|
17
|
+
],
|
|
18
|
+
"cpu": [
|
|
19
|
+
"arm64"
|
|
20
|
+
]
|
|
21
|
+
}
|