Skip to content

Commit 98e46c7

Browse files
committed
chore: add dts types
1 parent c8967ea commit 98e46c7

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

build.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
import dts from 'bun-plugin-dts-auto'
2+
3+
// eslint-disable-next-line no-console
4+
console.log('Building...')
5+
16
await Bun.build({
27
entrypoints: [
3-
'src/index.ts',
8+
'./src/index.ts',
49
],
5-
610
outdir: './dist',
11+
target: 'bun',
712

8-
// plugins: [
9-
// dts(),
10-
// ],
13+
plugins: [
14+
dts(),
15+
],
1116
})
17+
18+
// eslint-disable-next-line no-console
19+
console.log('Built!')

bun.lockb

393 Bytes
Binary file not shown.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
"src"
4242
],
4343
"scripts": {
44-
"build": "bun --bun build.ts",
44+
"build": "bun build.ts",
4545
"lint": "bunx eslint .",
4646
"lint:fix": "bunx eslint . --fix",
4747
"fresh": "bunx rimraf node_modules/ bun.lock && bun i",
4848
"commit": "git cz",
4949
"changelog": "bunx changelogen --output CHANGELOG.md",
50-
"prepublishOnly": "bun --bun run build",
50+
"prepublishOnly": "bun run build",
5151
"release": "bun run changelog && bunx bumpp package.json --all",
5252
"test": "bun test",
5353
"typecheck": "tsc --noEmit"
@@ -57,6 +57,7 @@
5757
"@stacksjs/eslint-config": "^0.58.73",
5858
"@types/bun": "^1.0.6",
5959
"@types/node": "^20.11.19",
60+
"bun-plugin-dts-auto": "^0.4.1",
6061
"changelogen": "^0.5.5",
6162
"commitizen": "^4.3.0",
6263
"cz-git": "^1.8.0",

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import process from 'node:process'
22
import { plugin } from 'bun'
33

44
await plugin({
5-
name: 'ENV',
5+
name: 'bun-plugin-env',
6+
67
async setup(build) {
78
(await import('dotenv')).config()
89

0 commit comments

Comments
 (0)