aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-01-27 00:59:11 +0100
committerjaubourg <j@ubourg.net>2011-01-27 00:59:11 +0100
commit7f95a730e50260c60e7d3ee4fa53cbe29258e6b6 (patch)
tree73708ad99eac522072f04cb6ca5c3a1491d23746
parent7d75ea950ea31a6734dc42e2037742b0c6719e8a (diff)
parentab1d9a8a2c296a2fa31b7d15146ce115c4057fad (diff)
downloadjquery-7f95a730e50260c60e7d3ee4fa53cbe29258e6b6.tar.gz
jquery-7f95a730e50260c60e7d3ee4fa53cbe29258e6b6.zip
Merge branch 'master' of github.com:jquery/jquery
-rw-r--r--Makefile38
-rw-r--r--src/core.js5
2 files changed, 27 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index c708db5a1..48a885da2 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ VER = sed "s/@VERSION/${JQ_VER}/"
DATE=$(shell git log -1 --pretty=format:%ad)
-all: init jquery min lint
+all: jquery min lint
@@echo "jQuery build complete."
${DIST_DIR}:
@@ -68,12 +68,16 @@ define clone_or_pull
endef
-init:
+${QUNIT_DIR}:
$(call clone_or_pull, ${QUNIT_DIR}, git://github.com/jquery/qunit.git)
+
+${SIZZLE_DIR}:
$(call clone_or_pull, ${SIZZLE_DIR}, git://github.com/jeresig/sizzle.git)
-jquery: ${JQ}
-jq: ${JQ}
+init: ${QUNIT_DIR} ${SIZZLE_DIR}
+
+jquery: init ${JQ}
+jq: init ${JQ}
${JQ}: ${MODULES} | ${DIST_DIR}
@@echo "Building" ${JQ}
@@ -88,18 +92,26 @@ ${SRC_DIR}/selector.js: ${SIZZLE_DIR}/sizzle.js
@@echo "Building selector code from Sizzle"
@@sed '/EXPOSE/r src/sizzle-jquery.js' ${SIZZLE_DIR}/sizzle.js | grep -v window.Sizzle > ${SRC_DIR}/selector.js
-lint: ${JQ}
- @@echo "Checking jQuery against JSLint..."
- @@${JS_ENGINE} build/jslint-check.js
+lint: jquery
+ @@if test ! -z ${JS_ENGINE}; then \
+ echo "Checking jQuery against JSLint..."; \
+ ${JS_ENGINE} build/jslint-check.js; \
+ else \
+ echo "You must have NodeJS installed in order to test jQuery against JSLint."; \
+ fi
min: ${JQ_MIN}
-${JQ_MIN}: ${JQ}
- @@echo "Building" ${JQ_MIN}
- @@${COMPILER} ${JQ} > ${JQ_MIN}.tmp
- @@echo ";" >> ${JQ_MIN}.tmp
- @@sed 's/\*\/(/*\/ʩ(/' ${JQ_MIN}.tmp | tr "ʩ" "\n" > ${JQ_MIN}
- @@rm -rf ${JQ_MIN}.tmp
+${JQ_MIN}: jquery
+ @@if test ! -z ${JS_ENGINE}; then \
+ echo "Minifying jQuery" ${JQ_MIN}; \
+ ${COMPILER} ${JQ} > ${JQ_MIN}.tmp; \
+ sed '$ s#^\( \*/\)\(.\+\)#\1\n\2;#' ${JQ_MIN}.tmp > ${JQ_MIN}; \
+ rm -rf ${JQ_MIN}.tmp; \
+ else \
+ echo "You must have NodeJS installed in order to minify jQuery."; \
+ fi
+
clean:
@@echo "Removing Distribution directory:" ${DIST_DIR}
diff --git a/src/core.js b/src/core.js
index 43d46e9e2..422b68876 100644
--- a/src/core.js
+++ b/src/core.js
@@ -929,10 +929,9 @@ jQuery.extend({
if ( length > 1 ) {
resolveArray = new Array( length );
- jQuery.each( args, function( index, element, args ) {
+ jQuery.each( args, function( index, element ) {
jQuery.when( element ).then( function( value ) {
- args = arguments;
- resolveArray[ index ] = args.length > 1 ? slice.call( args, 0 ) : value;
+ resolveArray[ index ] = arguments.length > 1 ? slice.call( arguments, 0 ) : value;
if( ! --length ) {
deferred.resolveWith( promise, resolveArray );
}