frontsideair / yarnhook

Run `yarn install`, `npm install` or `pnpm install` on git hooks automatically
MIT License
217 stars 17 forks source link

Handle other languages package managers #38

Open drazik opened 4 years ago

drazik commented 4 years ago

Hi,

I was going to implement a git hook to do just the same thing that yarnhook does, but for Composer (PHP package manager). But I thought it would be a shame to have yarnhook for yarn, and something specific for Composer. So I'm wondering if you are opened to handling not node-related package managers? In which case I can open a PR to add composer.

Thanks!

devinrhode2 commented 4 years ago

I know people using yarn+composer, and I'm sure they would be interested in this! If @frontsideair opts out you could rename your fork to something like "depsihook" where the i means install like with npm i. Or something more conservative+verbose like "auto-install-deps-hook" or "auto-install-packages-hook". If we want to get really fun signature name, maybe "auto-depsi" or "depsi-auto" or "packagi" or "pkgier".

"auto" may conflate it with things like the web pack auto installer plugins

On Wed, Apr 1, 2020, 3:34 AM Cyrille Perois notifications@github.com wrote:

Hi,

I was going to implement a git hook to do just the same thing that yarnhook does, but for Composer (PHP package manager). But I thought it would be a shame to have yarnhook for yarn, and something specific for Composer. So I'm wondering if you are opened to handling not node-related package managers? In which case I can open a PR to add composer.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/frontsideair/yarnhook/issues/38, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEDZKEPLVUBROBHUYK52T3RKL4CNANCNFSM4LYT4FOQ .

drazik commented 4 years ago

Yes, composer + npm/yarn must be a common use case. Mine is a Symfony project.

frontsideair commented 4 years ago

I have no objections to this. I personally don't use PHP but since composer hook will only work if there's a composer lockfile I think it is unobtrusive and see no reason to not allow this. So the PR is more than welcome.

In the future if the number of lockfiles proliferate and maintenance becomes a problem I may consider scaling back but for now it's all right to me!

devinrhode2 commented 4 years ago

INSTALL ALL THE THINGS!

Yeah I don't think one more file check on some git operations will be noticeable for anyone. The git hooks don't run often anyway. Even ls appears to complete instantly, and then you have a list of all possible lock files.

On Fri, Apr 3, 2020, 5:13 AM Fatih Altinok notifications@github.com wrote:

I have no objections to this. I personally don't use PHP but since composer hook will only work if there's a composer lockfile I think it is unobtrusive and see no reason to not allow this. So the PR is more than welcome.

In the future if the number of lockfiles proliferate and maintenance becomes a problem I may consider scaling back but for now it's all right to me!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/frontsideair/yarnhook/issues/38#issuecomment-608352413, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEDZKHQYRBELRYI2CYBYPLRKWZDPANCNFSM4LYT4FOQ .

drazik commented 4 years ago

Nice. I'm going to open a PR very soon then :)