docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.78k stars 5.68k forks source link

fix: husky can not auto install issue after upgrade. #2325

Closed Koooooo-7 closed 10 months ago

Koooooo-7 commented 11 months ago

Summary

Add husky hooks and auto trigger it by preinstall. close #2292

Related issue, if any:

What kind of change does this PR introduce?

Bugfix

For any code change,

Does this PR introduce a breaking change?

No

Yes No

Tested in the following browsers:

vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2024 2:43pm
Koooooo-7 commented 11 months ago

~Hi @trusktr, I don't have a Windows in hand. could plz take a test on Win ? thx.~

No bash compatibility issue now.

Koooooo-7 commented 11 months ago

Hi @jhildenbiddle , thx for you thoughts! I believe it should work after we preset the .husky/ hooks in project which I also test locally and in codespace/gitpod .

"postinstall": "opencollective-postinstall && npx husky install",

So I remove the useless husky.sh now and leave the npx husky install in postinstall in order to auto enable the hooks.

Koooooo-7 commented 10 months ago

Merged per to maintain rules.