Skip to content
Permalink
Browse files

Map Sizzle to a path with config to allow users to put Sizzle whereve…

…r they want
  • Loading branch information...
timmywil committed Sep 10, 2013
1 parent 73fe172 commit aab9d632797c46728a22eb615bd18cb7f5c9c497
Showing with 11 additions and 3 deletions.
  1. +4 −1 build/tasks/build.js
  2. +1 −1 src/selector-sizzle.js
  3. +6 −1 test/jquery.js
@@ -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;" );
@@ -1,6 +1,6 @@
define([
"./core",
"../bower_components/sizzle/dist/sizzle"
"sizzle"
], function ( jQuery, Sizzle ) {

jQuery.find = Sizzle;
@@ -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" ) {

0 comments on commit aab9d63

Please sign in to comment.
You can’t perform that action at this time.