Skip to content

Commit e5ccdfb

Browse files
authored
chore: update postinstall script (#2791)
1 parent 5099294 commit e5ccdfb

3 files changed

Lines changed: 8 additions & 25 deletions

File tree

.husky/install.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Skip Husky install in production and CI
2+
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
3+
process.exit(0);
4+
}
5+
const husky = (await import('husky')).default;
6+
console.log(husky());

SECURITY.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@
115115
"docker:test": "npm run docker:cli -- test",
116116
"lint:fix": "prettier . --write && eslint . --fix",
117117
"lint": "prettier . --check && eslint .",
118-
"postinstall": "opencollective-postinstall && npx husky install",
119-
"prepare": "npm run build",
118+
"postinstall": "opencollective-postinstall",
119+
"prepare": "npm run build && node .husky/install.mjs",
120120
"prettier": "prettier . --write",
121121
"pub:next": "cross-env RELEASE_TAG=next sh build/release.sh",
122122
"pub": "sh build/release.sh",

0 commit comments

Comments
 (0)