Skip to content

Commit

Permalink
chore: update husky install step (#5120)
Browse files Browse the repository at this point in the history
* chore: update husky install step

* chore: use correct path

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
  • Loading branch information
joshblack and joshblack authored Oct 14, 2024
1 parent 4f6134d commit 70a4d67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Skip Husky install in production and CI
// @see https://typicode.github.io/husky/how-to.html#ci-server-and-docker
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0)
}
const husky = (await import('husky')).default
console.log(husky())
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"type-check": "tsc --noEmit && npm run type-check -ws --if-present",
"release": "npm run build && changeset publish",
"size": "size-limit",
"prepare": "husky install"
"prepare": "node .husky/install.mjs"
},
"author": "GitHub, Inc.",
"license": "MIT",
Expand Down

0 comments on commit 70a4d67

Please sign in to comment.