Skip to content

Commit

Permalink
build: add ts compile step before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mualig committed Aug 21, 2024
1 parent 0ec0452 commit 5bdebe8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#!/bin/sh

npm run compile
npm run build
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"compile": "tsc --noEmit",
"build": "esbuild dist/index.d.ts --platform=node --bundle --format=cjs --outfile=dist/index.js",
"prepublish": "npm run build",
"prepublish": "npm run compile && npm run build",
"prepare": "husky",
"release": "commit-and-tag-version -s"
},
Expand Down
12 changes: 12 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "commonjs",
"noEmit": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipDefaultLibCheck": true,
"skipLibCheck": false
}
}

0 comments on commit 5bdebe8

Please sign in to comment.