Skip to content

Commit

Permalink
separate dist and lib dirs in package
Browse files Browse the repository at this point in the history
  • Loading branch information
sepbot committed Dec 6, 2024
1 parent be59117 commit dc55e6a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
*.tsbuildinfo
*.tgz
*.zip
node_modules
dist
lib
node_modules
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bump-version level:
create-release:
#!/bin/bash

zip -r dist.zip package.json tsconfig.json README.md LICENSE lib
zip -r dist.zip package.json tsconfig.json README.md LICENSE dist lib
version=$(cat package.json | jq -r .version)
gh release create "${version}" dist.zip \
--verify-tag \
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"client",
"typescript"
],
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"lib",
"package.json",
"tsconfig.json",
Expand All @@ -26,6 +27,7 @@
"pnpm": ">=9"
},
"scripts": {
"prebuild": "rm -rf *.tsbuildinfo",
"build": "tsc --project tsconfig-build.json",
"postbuild": "tsc-alias --project tsconfig-build.json",
"format": "biome check --verbose --write --unsafe",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "lib",
"outDir": "lib"
"outDir": "dist",
"declarationDir": "dist"
}
}
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"declaration": true,
"rootDir": ".",
"baseUrl": ".",
"declarationDir": "lib",
"sourceMap": true,
"composite": true,
"strict": true,
Expand Down

0 comments on commit dc55e6a

Please sign in to comment.