Skip to content

Commit

Permalink
feat(dts): added .d.ts file to output
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurchishin committed Nov 8, 2023
1 parent 3b136c1 commit 5d3eee9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.14.2
Binary file modified bun.lockb
Binary file not shown.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
],
"type": "module",
"module": "dist/index.js",
"exports": {
".": "./dist/index.js"
},
"types": "./dist/index.d.ts",
"scripts": {
"build": "bun run scripts/build.ts",
"type-check": "tsc --noEmit",
Expand All @@ -47,6 +51,7 @@
"@esfx/type-model": "1.0.0",
"@release-it/conventional-changelog": "7.0.2",
"@types/qs": "6.9.8",
"bun-plugin-dts": "0.2.1",
"bun-types": "latest",
"conventional-changelog-conventionalcommits": "7.0.2",
"eslint": "8.50.0",
Expand All @@ -65,4 +70,4 @@
"access": "public",
"@anylint:registry": "https://registry.npmjs.org"
}
}
}
4 changes: 3 additions & 1 deletion scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-console */
/* eslint-disable no-console,import/no-extraneous-dependencies */
import path from 'node:path'
import dts from 'bun-plugin-dts'
import packageJson from '../package.json'

const peerDependencies = Object.keys(packageJson.peerDependencies)
Expand All @@ -20,6 +21,7 @@ const bundle = async (minify: boolean) => {
minify,
external: peerDependencies,
root: './src',
plugins: [dts()],
})

if (build.success) {
Expand Down

0 comments on commit 5d3eee9

Please sign in to comment.