🆕 Add bundling to single executable with pkg

This commit is contained in:
Anees Iqbal
2024-10-04 21:20:08 +04:00
parent 1202271d7d
commit 9eb1c745e4
4 changed files with 1593 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
node_modules
.DS_Store
/lib
/bin
# Testing configs
ffmpeg-over-ip.client.jsonc

0
bin/.gitkeep Normal file
View File

1588
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,9 @@
"build:server": "esbuild src/server.ts --platform=node --bundle --outdir=lib",
"watch:server": "esbuild src/server.ts --platform=node --bundle --outdir=lib --watch",
"build:client": "esbuild src/client.ts --platform=node --bundle --outdir=lib",
"watch:client": "esbuild src/client.ts --platform=node --bundle --outdir=lib --watch"
"watch:client": "esbuild src/client.ts --platform=node --bundle --outdir=lib --watch",
"bin:client": "pkg lib/client.js --out-path=bin/ --targets=latest-alpine-x64,latest-alpine-arm64,latest-linux-x64,latest-linux-arm64,latest-linuxstatic-x64,latest-linuxstatic-arm64,latest-macos-x64,latest-macos-arm64,latest-win-x64,latest-win-arm64",
"bin:server": "pkg lib/server.js --out-path=bin/ --targets=latest-alpine-x64,latest-alpine-arm64,latest-linux-x64,latest-linux-arm64,latest-linuxstatic-x64,latest-linuxstatic-arm64,latest-macos-x64,latest-macos-arm64,latest-win-x64,latest-win-arm64"
},
"author": "steelbrain",
"license": "MIT",
@@ -22,6 +24,7 @@
"@biomejs/biome": "^1.5.3",
"@types/node": "20",
"esbuild": "^0.20.0",
"pkg": "^5.8.1",
"sb-stream-promise": "^2.0.0",
"strip-json-comments": "^5.0.1",
"typescript": "^5.3.3",