Skip to content

Commit f228dec

Browse files
Add build scripts
1 parent bac3d6c commit f228dec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"description": "An example of a serverless CRUD API built with TypeScript, integrating API Gateway, Lambda, and DynamoDB, all simulated locally with LocalStack for local development and testing.",
55
"main": "src/index.ts",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"prebuild": "del /q dist",
9+
"build": "esbuild 'src/index.ts' --banner:js='/* global handler */' --bundle --minify --sourcemap --platform=node --target=es2020 --outfile=dist/index.js && esbuild 'src/**/*.ts' --bundle --minify --sourcemap --platform=node --target=es2020 --outdir=dist",
10+
"postbuild": "cd dist && 7z a -tzip index.zip *"
811
},
912
"repository": {
1013
"type": "git",

0 commit comments

Comments
 (0)