Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created September 8, 2014 22:55
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 tmcw/157df4eb762efe7d7ea8 to your computer and use it in GitHub Desktop.
Save tmcw/157df4eb762efe7d7ea8 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "raw kb"
units "`cat $1 | wc -c` bytes" "kilobytes"
echo "uglified kb"
units "`uglifyjs $1 | wc -c` bytes" "kilobytes"
echo "gzipped kb"
units "`uglifyjs $1 | gzip -9f | wc -c` bytes" "kilobytes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment