diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt
index ea336914d..532704636 100644
--- a/MIT-LICENSE.txt
+++ b/MIT-LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2010 John Resig, http://jquery.com/
+Copyright (c) 2011 John Resig, http://jquery.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff --git a/Makefile b/Makefile
index 935f69c12..6a71722be 100644
--- a/Makefile
+++ b/Makefile
@@ -24,10 +24,9 @@ BASE_FILES = ${SRC_DIR}/core.js\
${SRC_DIR}/manipulation.js\
${SRC_DIR}/css.js\
${SRC_DIR}/ajax.js\
- ${SRC_DIR}/xhr.js\
- ${SRC_DIR}/transports/jsonp.js\
- ${SRC_DIR}/transports/script.js\
- ${SRC_DIR}/transports/xhr.js\
+ ${SRC_DIR}/ajax/jsonp.js\
+ ${SRC_DIR}/ajax/script.js\
+ ${SRC_DIR}/ajax/xhr.js\
${SRC_DIR}/effects.js\
${SRC_DIR}/offset.js\
${SRC_DIR}/dimensions.js
@@ -79,13 +78,13 @@ init:
jquery: ${JQ}
jq: ${JQ}
-${JQ}: ${MODULES} ${DIST_DIR}
+${JQ}: ${MODULES} | ${DIST_DIR}
@@echo "Building" ${JQ}
@@cat ${MODULES} | \
sed 's/.function..jQuery...{//' | \
sed 's/}...jQuery..;//' | \
- sed 's/Date:./&'"${DATE}"'/' | \
+ sed 's/@DATE/'"${DATE}"'/' | \
${VER} > ${JQ};
${SRC_DIR}/selector.js: ${SIZZLE_DIR}/sizzle.js
diff --git a/Rakefile b/Rakefile
index 5ea143b66..bf7ee2b58 100644
--- a/Rakefile
+++ b/Rakefile
@@ -9,7 +9,27 @@ test_dir = File.join( prefix, 'test' )
# setting DIST_DIR before calling rake
dist_dir = ENV['DIST_DIR'] || File.join( prefix, 'dist' )
-base_files = %w{intro core support data queue attributes event selector traversing manipulation css ajax xhr transports/jsonp transports/script transports/xhr effects offset dimensions outro}.map { |js| File.join( src_dir, "#{js}.js" ) }
+base_files = %w{
+ intro
+ core
+ support
+ data
+ queue
+ attributes
+ event
+ selector
+ traversing
+ manipulation
+ css
+ ajax
+ ajax/jsonp
+ ajax/script
+ ajax/xhr
+ effects
+ offset
+ dimensions
+ outro
+}.map { |js| File.join( src_dir, "#{js}.js" ) }
# Sizzle, QUnit and jQuery files/dirs
sizzle_dir = File.join( src_dir, "sizzle" )
@@ -31,7 +51,7 @@ rhino = "java -jar #{build_dir}/js.jar"
minfier = "java -jar #{build_dir}/google-compiler-20100917.jar"
# Turn off output other than needed from `sh` and file commands
-verbose(false)
+verbose(false)
# Tasks
task :default => "all"
@@ -51,7 +71,7 @@ task :min => jq_min
task :init => [sizzle, qunit] do
sizzle_git = File.join(sizzle_dir, '.git')
qunit_git = File.join(qunit_dir, '.git')
-
+
puts "Updating SizzleJS with latest..."
sh "git --git-dir=#{sizzle_git} pull -q origin master"
@@ -61,7 +81,7 @@ end
desc "Removes dist folder, selector.js, and Sizzle/QUnit"
task :clean do
- puts "Removing Distribution directory: #{dist_dir}..."
+ puts "Removing Distribution directory: #{dist_dir}..."
rm_rf dist_dir
puts "Removing built copy of Sizzle..."
@@ -87,9 +107,13 @@ directory dist_dir
file jq => [dist_dir, base_files].flatten do
puts "Building jquery.js..."
-
+
File.open(jq, 'w') do |f|
- f.write cat(base_files).gsub(/(Date:.)/, "\\1#{date}" ).gsub(/@VERSION/, version)
+ f.write cat(base_files).
+ gsub(/@DATE/, date).
+ gsub(/@VERSION/, version).
+ gsub(/.function..jQuery...\{/, '').
+ gsub(/\}...jQuery..;/, '')
end
end
@@ -97,9 +121,9 @@ file jq_min => jq do
puts "Building jquery.min.js..."
sh "#{minfier} --js #{jq} --warning_level QUIET --js_output_file #{jq_min}"
-
+
min = File.read( jq_min )
-
+
# Equivilent of "head"
File.open(jq_min, 'w') do |f|
f.write File.readlines(jq)[0..14].join()
@@ -107,12 +131,12 @@ file jq_min => jq do
end
end
-file selector => [sizzle, :init] do
+file selector => [sizzle, :init] do
puts "Building selector code from Sizzle..."
-
+
File.open(selector, 'w') do |f|
- f.write File.read(sizzle).gsub(
- /^.+EXPOSE$\n/,
+ f.write File.read(sizzle).gsub(
+ /^.+EXPOSE$\n/,
'\0' + File.read( File.join( src_dir, 'sizzle-jquery.js' ))
).gsub(
/^window.Sizzle.+$\n/, ''
diff --git a/build.xml b/build.xml
index f6650f440..87b31e192 100644
--- a/build.xml
+++ b/build.xml
@@ -63,10 +63,9 @@
-
-
-
-
+
+
+
@@ -77,7 +76,7 @@
-
+
diff --git a/src/ajax.js b/src/ajax.js
index da130faed..645163ad2 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -1,11 +1,20 @@
(function( jQuery ) {
-
-var rscript = /