Skip to content

Commit

Permalink
Hotfix: Update backend deploy script to work with shared TS setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarno Rantanen committed Mar 29, 2020
1 parent 8256fc2 commit 59b73a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tsconfig.json → backend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.shared.json",
"extends": "../tsconfig.shared.json",
"compilerOptions": {
"types": ["node", "aws-lambda"],
"lib": ["es2017"],
Expand All @@ -8,5 +8,5 @@
"@common/*": ["common/*"]
}
},
"include": ["backend/src/**/*.ts"]
"include": ["src/**/*.ts"]
}
5 changes: 2 additions & 3 deletions scripts/deploy-backend
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ BACKEND_DIR="$SELF_DIR/../backend"
(
cd "$BACKEND_DIR"
mkdir -p temp
cp "$ROOT_DIR"/package*.json temp
cp "$ROOT_DIR"/tsconfig.json .
"$ROOT_DIR/node_modules/.bin/tsc" # compile TypeScript into "temp" (defined in tsconfig.json)
cp "$ROOT_DIR"/package*.json temp
(cd temp && npm install --production)
(cd temp && zip -r ../dist/backend-lambda.zip *) # create Lambda zipfile under "dist"
rm -rf .tsconfig temp # clean up
rm -rf temp # clean up
)

# Upload code to S3
Expand Down

0 comments on commit 59b73a1

Please sign in to comment.