Skip to content

Commit 1f9dd12

Browse files
committed
chore: Add build script
1 parent ee0bf03 commit 1f9dd12

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"prepare": "husky",
88
"fmt": "biome check --write --unsafe .",
99
"lint": "biome check .",
10-
"typecheck": "tsc --noEmit"
10+
"typecheck": "tsc --noEmit",
11+
"build": "bun run ./scripts/build.ts"
1112
},
1213
"devDependencies": {
1314
"@biomejs/biome": "2.0.5",

scripts/build.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { $ } from "bun";
2+
3+
await $`rm -rf dist`;
4+
5+
await Bun.build({
6+
banner: "#!/usr/bin/env node",
7+
entrypoints: ["./src/index.ts"],
8+
outdir: "./dist",
9+
target: "node",
10+
packages: "external",
11+
});
12+
13+
await $`chmod +x ./dist/index.js`;

0 commit comments

Comments
 (0)