Skip to content

Commit

Permalink
fix: fixed husky
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Nov 7, 2024
1 parent bc176cc commit b37fea8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Skip Husky install in production and CI
// https://typicode.github.io/husky/how-to.html#ci-server-and-docker
if (process.env.NODE_ENV === "production" || process.env.CI === "true") {
console.log("Skipping Husky install because of production environment.");
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 @@ -28,7 +28,7 @@
"format:cspell": "cspell **/*",
"knip": "knip --config .github/knip.ts",
"knip-ci": "knip --no-exit-code --reporter json --config .github/knip.ts",
"prepare": "husky install",
"prepare": "node .husky/install.mjs",
"test": "jest --setupFiles dotenv/config --coverage"
},
"keywords": [
Expand Down

0 comments on commit b37fea8

Please sign in to comment.