Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
7f95a730
Commit
7f95a730
authored
Jan 26, 2011
by
jaubourg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:jquery/jquery
parents
7d75ea95
ab1d9a8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
16 deletions
+27
-16
Makefile
Makefile
+25
-13
core.js
src/core.js
+2
-3
No files found.
Makefile
View file @
7f95a730
...
@@ -43,7 +43,7 @@ VER = sed "s/@VERSION/${JQ_VER}/"
...
@@ -43,7 +43,7 @@ VER = sed "s/@VERSION/${JQ_VER}/"
DATE
=
$(
shell
git log
-1
--pretty
=
format:%ad
)
DATE
=
$(
shell
git log
-1
--pretty
=
format:%ad
)
all
:
init
jquery min lint
all
:
jquery min lint
@
@echo
"jQuery build complete."
@
@echo
"jQuery build complete."
${DIST_DIR}
:
${DIST_DIR}
:
...
@@ -68,12 +68,16 @@ define clone_or_pull
...
@@ -68,12 +68,16 @@ define clone_or_pull
endef
endef
init
:
${QUNIT_DIR}
:
$
(
call clone_or_pull,
${
QUNIT_DIR
}
, git://github.com/jquery/qunit.git
)
$
(
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
)
$
(
call clone_or_pull,
${
SIZZLE_DIR
}
, git://github.com/jeresig/sizzle.git
)
jquery
:
${JQ}
init
:
${QUNIT_DIR} ${SIZZLE_DIR}
jq
:
${JQ}
jquery
:
init ${JQ}
jq
:
init ${JQ}
${JQ}
:
${MODULES} | ${DIST_DIR}
${JQ}
:
${MODULES} | ${DIST_DIR}
@
@echo
"Building"
${
JQ
}
@
@echo
"Building"
${
JQ
}
...
@@ -88,18 +92,26 @@ ${SRC_DIR}/selector.js: ${SIZZLE_DIR}/sizzle.js
...
@@ -88,18 +92,26 @@ ${SRC_DIR}/selector.js: ${SIZZLE_DIR}/sizzle.js
@
@echo
"Building selector code from Sizzle"
@
@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
@
@sed
'/EXPOSE/r src/sizzle-jquery.js'
${
SIZZLE_DIR
}
/sizzle.js |
grep
-v
window.Sizzle
>
${
SRC_DIR
}
/selector.js
lint
:
${JQ}
lint
:
jquery
@
@echo
"Checking jQuery against JSLint..."
@
@if
test
!
-z
${
JS_ENGINE
}
;
then
\
@
@
${
JS_ENGINE
}
build/jslint-check.js
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}
min
:
${JQ_MIN}
${JQ_MIN}
:
${JQ}
${JQ_MIN}
:
jquery
@
@echo
"Building"
${
JQ_MIN
}
@
@if
test
!
-z
${
JS_ENGINE
}
;
then
\
@
@
${
COMPILER
}
${
JQ
}
>
${
JQ_MIN
}
.tmp
echo
"Minifying jQuery"
${
JQ_MIN
}
;
\
@
@echo
";"
>>
${
JQ_MIN
}
.tmp
${
COMPILER
}
${
JQ
}
>
${
JQ_MIN
}
.tmp
;
\
@
@sed
's/\*\/(/*\/ʩ(/'
${
JQ_MIN
}
.tmp |
tr
"ʩ"
"
\n
"
>
${
JQ_MIN
}
sed
'$ s#^\( \*/\)\(.\+\)#\1\n\2;#'
${
JQ_MIN
}
.tmp
>
${
JQ_MIN
}
;
\
@
@rm
-rf
${
JQ_MIN
}
.tmp
rm
-rf
${
JQ_MIN
}
.tmp
;
\
else
\
echo
"You must have NodeJS installed in order to minify jQuery."
;
\
fi
clean
:
clean
:
@
@echo
"Removing Distribution directory:"
${
DIST_DIR
}
@
@echo
"Removing Distribution directory:"
${
DIST_DIR
}
...
...
src/core.js
View file @
7f95a730
...
@@ -929,10 +929,9 @@ jQuery.extend({
...
@@ -929,10 +929,9 @@ jQuery.extend({
if
(
length
>
1
)
{
if
(
length
>
1
)
{
resolveArray
=
new
Array
(
length
);
resolveArray
=
new
Array
(
length
);
jQuery
.
each
(
args
,
function
(
index
,
element
,
args
)
{
jQuery
.
each
(
args
,
function
(
index
,
element
)
{
jQuery
.
when
(
element
).
then
(
function
(
value
)
{
jQuery
.
when
(
element
).
then
(
function
(
value
)
{
args
=
arguments
;
resolveArray
[
index
]
=
arguments
.
length
>
1
?
slice
.
call
(
arguments
,
0
)
:
value
;
resolveArray
[
index
]
=
args
.
length
>
1
?
slice
.
call
(
args
,
0
)
:
value
;
if
(
!
--
length
)
{
if
(
!
--
length
)
{
deferred
.
resolveWith
(
promise
,
resolveArray
);
deferred
.
resolveWith
(
promise
,
resolveArray
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment