INFRA-2668 | add bundle size on pre push

This commit is contained in:
dhruvjoshi
2024-02-19 17:45:10 +05:30
parent 8164d0a484
commit 1a1f5ec2bf
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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*