Skip to content

Instantly share code, notes, and snippets.

@Jalle19
Created September 5, 2018 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jalle19/f3b7a09f5fe7b854128929678cabec50 to your computer and use it in GitHub Desktop.
Save Jalle19/f3b7a09f5fe7b854128929678cabec50 to your computer and use it in GitHub Desktop.
Figure out which changes affected the bundle size the most
#!/bin/bash
git log --oneline --pretty=format:"%h" yarn.lock | head -n 30 > last30_yarn_lock_commits.txt
while read REVISION; do
git show --oneline --quiet $REVISION
{
git checkout -f $REVISION
rm -rf node_moduels/
yarn install --production
yarn run compile
} > /dev/null 2>&1
ls -lh dist | grep main
done < last30_yarn_lock_commits.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment