Skip to content

Commit

Permalink
chore: add bun build script
Browse files Browse the repository at this point in the history
  • Loading branch information
zSoulweaver committed Oct 25, 2024
1 parent d1183c8 commit 0a33fa5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 deletions.
10 changes: 10 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import dts from 'bun-plugin-dts'

await Bun.build({
entrypoints: ['./src/index.ts'],
outdir: './dist',
target: 'node',
// @ts-expect-error https://bun.sh/docs/bundler#packages
packages: 'external',
plugins: [dts()],
})
Binary file modified bun.lockb
Binary file not shown.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
"module": "src/index.ts",
"type": "module",
"scripts": {
"build": "bun ./build.ts",
"dev": "bun run --watch example/init.ts",
"docs:prepare": "typedoc",
"docs:dev": "typedoc && vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
"prerelease": "changelogen --release --prerelease",
"publish-release": "changelogen gh release"
"prerelease": "changelogen --release --prerelease"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@deepkit/bun": "^1.0.1-alpha.153",
"@deepkit/type-compiler": "^1.0.1-alpha.150",
"@types/bun": "^1.1.6",
"bun-plugin-dts": "^0.3.0",
"changelogen": "^0.5.7",
"typedoc": "^0.26.5",
"typedoc-plugin-markdown": "^4.2.3",
Expand All @@ -26,7 +27,7 @@
"vitepress": "^1.3.1"
},
"peerDependencies": {
"typescript": "^5.5.4"
"typescript": "^5.6.3"
},
"dependencies": {
"@deepkit/type": "^1.0.1-alpha.153",
Expand Down
22 changes: 17 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext"],
"lib": [
"ESNext"
],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"allowJs": true,
// "isolatedDeclarations": true,
// "declaration": true,
// "declarationDir": "./types",
// Bundler mode
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
Expand All @@ -21,11 +26,18 @@
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false,
"paths": {
"kient": ["./src/index.ts"]
"kient": [
"./src/index.ts"
]
},
"outDir": "dist"
},
"reflection": true,
"include": ["src", "example"],
"exclude": ["node_modules"]
}
"include": [
"src",
"example"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 0a33fa5

Please sign in to comment.