From 9e29592a692acbb5f20b04372a415ef0e04546bc Mon Sep 17 00:00:00 2001 From: timngyn Date: Thu, 28 Sep 2023 15:03:58 -0700 Subject: [PATCH 1/4] Remove unused script for amplify lambda --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 763cd4a4370..ab8a54f5280 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,6 @@ "build": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build && next-image-export-optimizer --exportFolderPath client/www/next-build", "next-build": "next build", "next-start": "next start", - "amplify:submissionsLambda": "cd amplify/backend/function/submissionsLambda/src && yarn install && yarn build && yarn test", "prepare": "husky install" } } From 3fdd0e5a7dc88cca1d73c75849a8b79c61a608c2 Mon Sep 17 00:00:00 2001 From: timngyn Date: Thu, 28 Sep 2023 15:05:32 -0700 Subject: [PATCH 2/4] Remove old and unused workspace --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index ab8a54f5280..091ba8c43f3 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,6 @@ }, "license": "Apache-2.0", "private": true, - "workspaces": [ - "capi" - ], "dependencies": { "@algolia/autocomplete-js": "^1.5.3", "@algolia/autocomplete-plugin-query-suggestions": "^1.5.6", From b1af4510499e2fef13d356d44762062e4420abcd Mon Sep 17 00:00:00 2001 From: timngyn Date: Thu, 28 Sep 2023 15:22:10 -0700 Subject: [PATCH 3/4] Create 'build:release' to build and optimize images --- amplify.yml | 2 +- package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/amplify.yml b/amplify.yml index 9e850e25220..5727377e1e3 100644 --- a/amplify.yml +++ b/amplify.yml @@ -8,7 +8,7 @@ frontend: build: commands: - echo "BUILD_ENV=$BUILD_ENV" >> .env.custom - - NODE_ENV=production yarn build + - NODE_ENV=production yarn build:release - if [ "${AWS_BRANCH}" = "main" ]; then node tasks/build-algolia-search.mjs; fi artifacts: # IMPORTANT - Please verify your build output directory diff --git a/package.json b/package.json index 091ba8c43f3..dce1cba13c2 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,8 @@ "dev": "next dev", "spellcheck": "cspell \"src/**/*.mdx\" --no-progress", "spellcheck-diff": "git diff --name-only --cached | awk \"/src.*\\.mdx/{print}\" | npx cspell --no-must-find-files --file-list stdin", - "build": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build && next-image-export-optimizer --exportFolderPath client/www/next-build", + "build": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build", + "build:release": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build && next-image-export-optimizer --exportFolderPath client/www/next-build", "next-build": "next build", "next-start": "next start", "prepare": "husky install" From 1029e55e91f6af16dbcd5e6baa3dcd8a5c01aa52 Mon Sep 17 00:00:00 2001 From: timngyn Date: Thu, 28 Sep 2023 15:40:14 -0700 Subject: [PATCH 4/4] Reuse the existing 'build' script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dce1cba13c2..218bfcf79ae 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "spellcheck": "cspell \"src/**/*.mdx\" --no-progress", "spellcheck-diff": "git diff --name-only --cached | awk \"/src.*\\.mdx/{print}\" | npx cspell --no-must-find-files --file-list stdin", "build": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build", - "build:release": "node tasks/generate-sitemap.mjs && next build && next export -o client/www/next-build && next-image-export-optimizer --exportFolderPath client/www/next-build", + "build:release": "yarn build && next-image-export-optimizer --exportFolderPath client/www/next-build", "next-build": "next build", "next-start": "next start", "prepare": "husky install"