-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v5: why does a custom directory require package.json? #827
Comments
The fact that the custom dir requires |
Should be good with |
Works as expected now, awesome 👍 Thank you very much! |
This was referenced Mar 7, 2021
This was referenced Mar 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The v5 documentation says you can install Husky into a custom directory with the install command by specifying a custom path. However, the source requires this custom directory to have a
package.json
file (see below), but that doesn't seem necessary to me. I did some manual testing (commenting out the snippet below innode_modules/husky
) and installed into a subdirectory and as far as I can tell everything works fine (including running NPM scripts, but even if that wasn't possible I don't know why that must be supported), but maybe I'm missing something...husky/src/commands/install.ts
Lines 32 to 34 in aaf1bee
Relatedly, the first example in the "Custom directory" documentation suggests to me that I can install the hooks into a directory called
.config
instead of.husky
, but the result of the example would be that the hooks are installed into.config/.husky
. Not sure if that is just me reading it wrong or if it is a mistake in the documentation.In any case, I would like to see the option to change the name of the
.husky
folder in addition to changing the directory, would you be open to such a feature @typicode? My initial suggestion for this would be to have a separate option+argument for that, e.g.husky install custom/dir -dirname .config
.The text was updated successfully, but these errors were encountered: