Permalink
Browse files

add crude build size script

  • Loading branch information...
1 parent bdc1670 commit 466c13bac77e7604f1489b13af8800319f2ecc8f @makeusabrew committed Oct 11, 2013
Showing with 15 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +14 −0 build/calculate-size
View
@@ -6,3 +6,4 @@ bootbox.min.js
.idea
tests/reports
tests/coverage
+build/size.csv
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env zsh
+
+SRC="bootbox.js"
+MIN="/tmp/bootbox.min.js"
+
+uglifyjs $SRC -c -m > $MIN
+
+RAW="$(wc -c $SRC | awk '{print $1}')"
+MRAW="$(wc -c $MIN | awk '{print $1}')"
+GZIP="$(cat $SRC | gzip | wc -c | awk '{print $1}')"
+MGZIP="$(cat $MIN | gzip | wc -c | awk '{print $1}')"
+
+echo "raw,min,raw+gzip,min+gzip\n$RAW,$MRAW,$GZIP,$MGZIP" > build/size.csv
+rm $MIN

0 comments on commit 466c13b

Please sign in to comment.