Skip to content

Commit

Permalink
Build script
Browse files Browse the repository at this point in the history
  • Loading branch information
lafkpages committed Oct 14, 2023
1 parent 604e695 commit eff20f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@tybys/chromium-pickle-js": "^1.0.0"
},
"scripts": {
"build": "bun scripts/build.ts",
"build:docs": "typedoc src/index.ts"
}
}
14 changes: 14 additions & 0 deletions scripts/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { rm } from "fs/promises";

const outdir = "dist";

await rm(outdir, { recursive: true, force: true });

await Bun.build({
entrypoints: ["src/index.ts"],
target: "node",
minify: true,
sourcemap: "external",
outdir,
splitting: true,
});

0 comments on commit eff20f5

Please sign in to comment.