aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCorey Frang <gnarf@gnarf.net>2011-09-19 15:27:43 -0400
committertimmywil <timmywillisn@gmail.com>2011-09-19 15:27:43 -0400
commit61277d2864b00c5206d0fdcefc67f7497663a012 (patch)
tree76a2c944de342b6e83feb0717fed61c7ee9564d9 /Makefile
parent8f447576c918e3004ea479c278c11677920dc41a (diff)
downloadjquery-61277d2864b00c5206d0fdcefc67f7497663a012.tar.gz
jquery-61277d2864b00c5206d0fdcefc67f7497663a012.zip
Landing pull request 511. Adding a little Makefile jQuery sizing utility to easily see differences in size between makes. Fixes #10308.
More Details: - https://github.com/jquery/jquery/pull/511
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 06cee5de3..59f63bdd9 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ DATE=$(shell git log -1 --pretty=format:%ad)
all: update_submodules core
-core: jquery min lint
+core: jquery min lint size
@@echo "jQuery build complete."
${DIST_DIR}:
@@ -73,6 +73,15 @@ lint: jquery
echo "You must have NodeJS installed in order to test jQuery against JSLint."; \
fi
+size: jquery min
+ @@if test ! -z ${JS_ENGINE}; then \
+ gzip -c ${JQ_MIN} > ${JQ_MIN}.gz; \
+ wc -c ${JQ} ${JQ_MIN} ${JQ_MIN}.gz | ${JS_ENGINE} ${BUILD_DIR}/sizer.js; \
+ rm ${JQ_MIN}.gz; \
+ else \
+ echo "You must have NodeJS installed in order to size jQuery."; \
+ fi
+
min: jquery ${JQ_MIN}
${JQ_MIN}: ${JQ}
@@ -84,7 +93,6 @@ ${JQ_MIN}: ${JQ}
else \
echo "You must have NodeJS installed in order to minify jQuery."; \
fi
-
clean:
@@echo "Removing Distribution directory:" ${DIST_DIR}