1 # Basic Rakefile for building jQuery
2 files = [ "intro", "core", "support", "data", "queue", "event", "selector", "traversing", "attributes", "manipulation", "css", "ajax", "effects", "offset", "dimensions", "outro" ]
4 date = `git log -1 | grep Date: | sed 's/[^:]*: *//'`.gsub(/\n/, "")
5 version = `cat version.txt`.gsub(/\n/, "")
7 task :default => :jquery
10 sh "if test ! -d test/qunit; then git clone git://github.com/jquery/qunit.git test/qunit; fi"
11 sh "if test ! -d src/sizzle; then git clone git://github.com/jeresig/sizzle.git src/sizzle; fi"
12 sh "cd src/sizzle && git pull origin master &> /dev/null"
13 sh "cd test/qunit && git pull origin master &> /dev/null"
16 task :jquery => [:init, :selector] do
19 sh "cat " + files.map {|file| "src/" + file + ".js"}.join(" ") +
20 " | sed 's/Date:./&" + date + "/' | " +
21 " sed s/@VERSION/" + version + "/ > dist/jquery.js"
25 sh "sed '/EXPOSE/r src/sizzle-jquery.js' src/sizzle/sizzle.js > src/selector.js"