Track gzipped code size, too gzip-size
authorDan Vanderkam <danvdk@gmail.com>
Mon, 26 Oct 2015 17:47:08 +0000 (13:47 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Mon, 26 Oct 2015 17:50:55 +0000 (13:50 -0400)
.travis.yml
scripts/weigh-in.sh [new file with mode: 0755]

index cbda81c..198ce97 100644 (file)
@@ -9,5 +9,4 @@ script: >
     npm run test &&
     npm run coverage &&
     ./scripts/post-coverage.sh &&
-    curl -O https://raw.githubusercontent.com/danvk/travis-weigh-in/master/weigh_in.py &&
-    python weigh_in.py dist/dygraph-combined.js
+    ./scripts/weigh-in.sh
diff --git a/scripts/weigh-in.sh b/scripts/weigh-in.sh
new file mode 100755 (executable)
index 0000000..e58f786
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+# This tracks the effect of pull requests on the size of dygraphs.
+# See https://github.com/danvk/travis-weigh-in
+set -o errexit
+
+curl -O https://raw.githubusercontent.com/danvk/travis-weigh-in/master/weigh_in.py
+python weigh_in.py dist/dygraph-combined.js
+gzip -c dist/dygraph.min.js > dist/dygraph.min.js.gz
+python weigh_in.py dist/dygraph.min.js.gz