Skip to content

Commit

Permalink
build: 🐛 rearrange scripts to fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Nemchik <[email protected]>
  • Loading branch information
nemchik committed Jul 18, 2024
1 parent d11c70f commit d0a77f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0);
}
const husky = (await import('husky')).default;
console.log(husky());
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"type": "module",
"main": "dist/index.js",
"scripts": {
"prebuild": "rimraf dist",
"prebuild": "rimraf dist || true",
"build": "tsc --build",
"prepare": "node -e \"process.env.NODE_ENV != 'production' && process.exit(1)\" || husky",
"prepare": "node .husky/install.mjs",
"prestart": "npm run build",
"start": "node .",
"test": "eslint"
Expand Down

0 comments on commit d0a77f2

Please sign in to comment.