Skip to content

Commit ece0bbe

Browse files
committed
tweak: use bun.build to bundle the node sdk & include all dependencies
1 parent 9a8ac0e commit ece0bbe

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

sdk/node/build.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import dts from 'bun-plugin-dts'
2+
3+
await Bun.build({
4+
entrypoints: ['./src/index.ts'],
5+
outdir: './dist',
6+
plugins: [
7+
dts()
8+
],
9+
minify: true,
10+
sourcemap: "external"
11+
})

sdk/node/bun.lockb

-21.8 KB
Binary file not shown.

sdk/node/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "meel",
33
"description": "Typescript wrapper for the Meel project",
4-
"version": "0.0.11",
4+
"version": "0.0.12",
55
"author": {
66
"name": "borisnliscool",
77
"url": "https://github.com/borisnliscool"
@@ -17,7 +17,7 @@
1717
"main": "dist/index.js",
1818
"types": "dist/index.d.ts",
1919
"scripts": {
20-
"build": "rimraf dist && tsc --project tsconfig.build.json && uglifyjs-folder dist/ -e -x .js -o dist/",
20+
"build": "rimraf dist && bun build.ts",
2121
"prepublish": "bun run build",
2222
"lint": "bun run prettier src/ --check && bun run eslint",
2323
"format": "bun run prettier . --write"
@@ -26,13 +26,14 @@
2626
"typescript": "^5.0.0"
2727
},
2828
"devDependencies": {
29+
"@types/bun": "^1.2.19",
2930
"@eslint/js": "^9.15.0",
3031
"eslint": "^9.15.0",
3132
"globals": "^15.12.0",
3233
"prettier": "3.3.3",
3334
"rimraf": "^6.0.1",
3435
"typescript-eslint": "^8.14.0",
35-
"uglifyjs-folder": "^3.3.0"
36+
"bun-plugin-dts": "^0.3.0"
3637
},
3738
"dependencies": {
3839
"@borisnl/tried": "^1.0.5",

0 commit comments

Comments
 (0)