How can I generate configs for multiple directories? #633
Unanswered
allanlewis
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hey! Lefthook has So, I guess it will look something like this: pre-commit:
commands:
component1:
root: project1/
run: make component1
component2:
root: project2
run: make component2 If you have the same command to run you can use YAML anchors _: # this custom hook is used only to provide the anchor
commands:
command: &command
run: yarn lint
glob: "*.js"
stage_fixed: true
pre-commit:
commands:
component1:
*command
root: project1/
component2:
*command
root: project2 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a monorepo with a number of components, each in its own directory. The hooks I want to fun for each component are similar; for the purpose of this discussion let's say they're the same but with the name of the component/service templated-in somehow. Can Lefthook support this?
Beta Was this translation helpful? Give feedback.
All reactions