Skip to content

Commit

Permalink
Bundle telegram bot with esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
printfn committed Oct 1, 2024
1 parent c7650ea commit df9383c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions telegram-bot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ jq "setpath([\"name\"]; \"fend-wasm-nodejs\")" ../wasm/pkg-nodejs/package.json >
mv temp ../wasm/pkg-nodejs/package.json

npm install
npm exec -- esbuild --bundle index.js --outdir=dist --platform=node

rm -f lambda_package.zip
zip -r lambda_package.zip \
node_modules/ index.js \
package.json package-lock.json
zip -j lambda_package.zip dist/index.js package.json package-lock.json
3 changes: 3 additions & 0 deletions telegram-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
"homepage": "https://github.com/printfn/fend#readme",
"dependencies": {
"fend-wasm-nodejs": "file:../wasm/pkg-nodejs"
},
"devDependencies": {
"esbuild": "^0.24.0"
}
}

0 comments on commit df9383c

Please sign in to comment.