# 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 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 xhr transports/jsonp transports/script transports/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" )
# Build tools
rhino = "java -jar #{build_dir}/js.jar"
-minfier = "java -jar #{build_dir}/google-compiler-20091218.jar"
+minfier = "java -jar #{build_dir}/google-compiler-20100917.jar"
# Turn off output other than needed from `sh` and file commands
verbose(false)
# Tasks
-task :default => "jquery"
+task :default => "all"
desc "Builds jQuery; Tests with JSLint; Minifies jQuery"
task :all => [:jquery, :lint, :min] do
desc "Removes dist folder, selector.js, and Sizzle/QUnit"
task :clean do
puts "Removing Distribution directory: #{dist_dir}..."
- rm_r dist_dir, :force => true
+ rm_rf dist_dir
puts "Removing built copy of Sizzle..."
- rm_r selector, :force => true
+ rm_rf selector
puts "Removing cloned directories..."
- rm_r qunit_dir, :force => true
- rm_r sizzle_dir, :force => true
+ rm_rf qunit_dir
+ rm_rf sizzle_dir
end
desc "Rebuilds selector.js from SizzleJS"
end
file qunit do
- puts "Retrieving QUnity from Github..."
+ puts "Retrieving QUnit from Github..."
sh "git clone git://github.com/jquery/qunit.git #{qunit_dir}"
end
files.map do |file|
File.read(file)
end.join('')
-end
\ No newline at end of file
+end