We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac49dd3 commit 9abef3aCopy full SHA for 9abef3a
bin/verify-bundle-size.sh
@@ -4,11 +4,16 @@
4
# We might have to change this later.
5
MAX=50000
6
7
-SIZE=`gzip -c packages/node_modules/pouchdb/dist/pouchdb.min.js | wc -c`
+# testing pouchdb.js instead of pouchdb.min.js because minification isn't run in Travis
8
+# in order to make our builds faster
9
+SIZE=`./node_modules/.bin/uglifyjs -mc < packages/node_modules/pouchdb/dist/pouchdb.js 2>/dev/null | gzip -c | wc -c`
10
-echo "Checking that pouchdb.min.js size $SIZE is less than $MAX"
11
+echo "Checking that pouchdb.min.js size $SIZE is less than $MAX and greater than 20"
12
-if [ "$SIZE" -lt "$MAX" ]; then
13
+if [ "$SIZE" -lt 21 ]; then
14
+ echo Failure
15
+ exit 1
16
+elif [ "$SIZE" -lt "$MAX" ]; then
17
echo Success
18
exit 0
19
else
0 commit comments