aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-07-29 21:14:46 +0200
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-07-29 21:19:21 +0200
commit47835965bd100a3661d8299d8b769ceeb8b6ce48 (patch)
tree5ef322bc48cd27d5a5f004e6e3fcf955c67fc9eb /build/tasks
parent79b74e043a4ee737d44a95094ff1184e40bd5b16 (diff)
downloadjquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.tar.gz
jquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.zip
Selector: Inline Sizzle into the selector module
This commit removes Sizzle from jQuery, inlining its code & removing obsolete workarounds where applicable. The selector-native module has been removed. Further work on the selector module may decrease the size enough that it will no longer be necessary. If it turns out it's still useful, we'll reinstate it but the code will look different anyway as we'll want to share as much code as possible with the existing selector module. The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are sorted by their first contributions to either of the two repositories. The commit reduces the gzipped jQuery size by 1460 bytes compared to master. Closes gh-4395
Diffstat (limited to 'build/tasks')
-rw-r--r--build/tasks/build.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index 73dfd581d..d536f538c 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -72,13 +72,6 @@ module.exports = function( grunt ) {
)
.replace( rdefineEnd, "" );
- // Sizzle treatment
- } else if ( /\/sizzle$/.test( name ) ) {
- contents = "var Sizzle =\n" + contents
-
- // Remove EXPOSE lines from Sizzle
- .replace( /\/\/\s*EXPOSE[\w\W]*\/\/\s*EXPOSE/, "return Sizzle;" );
-
} else {
contents = contents
@@ -218,11 +211,6 @@ module.exports = function( grunt ) {
}
} else {
grunt.log.error( "Module \"" + module + "\" is a minimum requirement." );
- if ( module === "selector" ) {
- grunt.log.error(
- "If you meant to replace Sizzle, use -sizzle instead."
- );
- }
}
} else {
grunt.log.writeln( flag );
@@ -259,13 +247,6 @@ module.exports = function( grunt ) {
excluder( flag );
}
- // Handle Sizzle exclusion
- // Replace with selector-native
- if ( ( index = excluded.indexOf( "sizzle" ) ) > -1 ) {
- config.rawText.selector = "define(['./selector-native']);";
- excluded.splice( index, 1 );
- }
-
// Replace exports/global with a noop noConflict
if ( ( index = excluded.indexOf( "exports/global" ) ) > -1 ) {
config.rawText[ "exports/global" ] = "define(['../core']," +