Skip to content

Commit

Permalink
Set install script
Browse files Browse the repository at this point in the history
Signed-off-by: Leon de Klerk <[email protected]>
  • Loading branch information
leondeklerk committed Feb 23, 2024
1 parent 14439ea commit 7fcc9ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ COPY package.json ./
COPY package-lock.json ./
COPY dist ./
COPY scripts ./scripts/
RUN npm ci --omit=dev
RUN npm i
CMD ["node", "index.js"]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "npm run type-check && npm run build-only",
"type-check": "tsc --noEmit",
"start": "node dist/index.js",
"prepare": "husky",
"prepare": "node scripts/install.mjs",
"build-only": "tsc"
},
"keywords": [],
Expand Down
6 changes: 6 additions & 0 deletions scripts/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())

0 comments on commit 7fcc9ee

Please sign in to comment.