Skip to content

Commit

Permalink
chore: add dts types
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Feb 24, 2024
1 parent c8967ea commit 98e46c7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
18 changes: 13 additions & 5 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import dts from 'bun-plugin-dts-auto'

// eslint-disable-next-line no-console
console.log('Building...')

await Bun.build({
entrypoints: [
'src/index.ts',
'./src/index.ts',
],

outdir: './dist',
target: 'bun',

// plugins: [
// dts(),
// ],
plugins: [
dts(),
],
})

// eslint-disable-next-line no-console
console.log('Built!')
Binary file modified bun.lockb
Binary file not shown.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
"src"
],
"scripts": {
"build": "bun --bun build.ts",
"build": "bun build.ts",
"lint": "bunx eslint .",
"lint:fix": "bunx eslint . --fix",
"fresh": "bunx rimraf node_modules/ bun.lock && bun i",
"commit": "git cz",
"changelog": "bunx changelogen --output CHANGELOG.md",
"prepublishOnly": "bun --bun run build",
"prepublishOnly": "bun run build",
"release": "bun run changelog && bunx bumpp package.json --all",
"test": "bun test",
"typecheck": "tsc --noEmit"
Expand All @@ -57,6 +57,7 @@
"@stacksjs/eslint-config": "^0.58.73",
"@types/bun": "^1.0.6",
"@types/node": "^20.11.19",
"bun-plugin-dts-auto": "^0.4.1",
"changelogen": "^0.5.5",
"commitizen": "^4.3.0",
"cz-git": "^1.8.0",
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import process from 'node:process'
import { plugin } from 'bun'

await plugin({
name: 'ENV',
name: 'bun-plugin-env',

async setup(build) {
(await import('dotenv')).config()

Expand Down

0 comments on commit 98e46c7

Please sign in to comment.