Skip to content

Commit

Permalink
Merge pull request #60 from ahocevar/types-without-dependencies
Browse files Browse the repository at this point in the history
Publish types without devDependencies
  • Loading branch information
dy authored Jan 29, 2025
2 parents b6d4807 + 96f149e commit 7b50b3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ docs
*.pdf
*.pak
dist
build


design
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
],
"license": "MIT",
"main": "./index.js",
"types": "./dist/color-space.d.ts",
"devDependencies": {
"almost-equal": "^1.1.0",
"esbuild": "^0.24.2",
Expand All @@ -47,6 +48,7 @@
"test": "uvu test",
"build": "esbuild ./index.js --bundle --format=esm --outfile=dist/color-space.js",
"min": "esbuild ./dist/color-space.js --minify --outfile=dist/color-space.min.js",
"prepublishOnly": "npm run build && npm run min"
"types": "npx -y --package=typescript@latest -c 'tsc' && npx --package dts-bundle@latest -c 'dts-bundle --name color-space --main build/**/*.d.ts --baseDir . --out dist/color-space.d.ts'",
"prepublishOnly": "npm run build && npm run min && npm run types"
}
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
"outDir": "./dist",
"outDir": "./build",
},
"include": [
"index.js",
Expand Down

0 comments on commit 7b50b3c

Please sign in to comment.