From 1a1f5ec2bf0078ea50496640c640f45dbc1266c0 Mon Sep 17 00:00:00 2001 From: dhruvjoshi Date: Mon, 19 Feb 2024 17:45:10 +0530 Subject: [PATCH] INFRA-2668 | add bundle size on pre push --- .husky/pre-push | 5 ++++- .prettierignore | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.husky/pre-push b/.husky/pre-push index cfd290b..430e180 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,7 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -yarn prettier:write && yarn test --silent +yarn prettier:write && yarn test --silent && yarn webpack-build > ___results_bundle_size.txt +total_size=$(awk '/Entrypoint entry/ {print $3}' ___results_bundle_size.txt) +echo "$(tput setaf 1) Total size of bundle: $total_size MiB $(tput sgr 0)" +rm ___results_bundle_size.txt \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 86bd76a..0fa24b7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -22,6 +22,7 @@ src/model/offer-management .env.test.local .env.production.local *.md +*.txt npm-debug.log* yarn-debug.log* yarn-error.log*