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
5fbf4a4f
Commit
5fbf4a4f
authored
Sep 10, 2013
by
Timmy Willison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Map Sizzle to a path with config to allow users to put Sizzle wherever they want
parent
81231909
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
build.js
build/tasks/build.js
+4
-1
selector-sizzle.js
src/selector-sizzle.js
+1
-1
jquery.js
test/jquery.js
+6
-1
No files found.
build/tasks/build.js
View file @
5fbf4a4f
...
...
@@ -26,6 +26,9 @@ module.exports = function( grunt ) {
startFile
:
"src/intro.js"
,
endFile
:
"src/outro.js"
},
paths
:
{
sizzle
:
"../bower_components/sizzle/dist/sizzle"
},
rawText
:
{},
onBuildWrite
:
convert
};
...
...
@@ -47,7 +50,7 @@ module.exports = function( grunt ) {
.
replace
(
rdefineEnd
,
""
);
// Sizzle treatment
}
else
if
(
/
\/
sizzle$/
.
test
(
name
)
)
{
}
else
if
(
/
^
sizzle$/
.
test
(
name
)
)
{
contents
=
"var Sizzle =
\n
"
+
contents
// Remove EXPOSE lines from Sizzle
.
replace
(
/
\/\/\s
*EXPOSE
[\w\W]
*
\/\/\s
*EXPOSE/
,
"return Sizzle;"
);
...
...
src/selector-sizzle.js
View file @
5fbf4a4f
define
([
"./core"
,
"
../bower_components/sizzle/dist/
sizzle"
"sizzle"
],
function
(
jQuery
,
Sizzle
)
{
jQuery
.
find
=
Sizzle
;
...
...
test/jquery.js
View file @
5fbf4a4f
...
...
@@ -28,7 +28,12 @@
// If QUnit is on window, this is the main window
// This detection allows AMD tests to be run in an iframe
if
(
QUnit
.
urlParams
.
amd
&&
window
.
QUnit
)
{
require
.
config
({
baseUrl
:
path
});
require
.
config
({
baseUrl
:
path
,
paths
:
{
sizzle
:
path
+
"bower_components/sizzle/dist/sizzle"
}
});
src
=
"src/jquery"
;
// Include tests if specified
if
(
typeof
loadTests
!==
"undefined"
)
{
...
...
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