Adding a Rakefile to build jQuery core, for those that need it.
authorjeresig <jeresig@gmail.com>
Sun, 29 Nov 2009 21:21:54 +0000 (16:21 -0500)
committerjeresig <jeresig@gmail.com>
Sun, 29 Nov 2009 21:21:54 +0000 (16:21 -0500)
Rakefile [new file with mode: 0644]

diff --git a/Rakefile b/Rakefile
new file mode 100644 (file)
index 0000000..e1c15bb
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,19 @@
+# Basic Rakefile for building jQuery
+files = [ "intro", "core", "data", "event", "support", "selector", "traversing", "attributes", "manipulation", "css", "ajax", "fx", "offset", "dimensions", "outro" ]
+
+date = `git log -1 | grep Date: | sed 's/[^:]*: *//'`.gsub(/\n/, "")
+version = `cat version.txt`.gsub(/\n/, "")
+
+task :default => :jquery
+
+task :jquery => [:selector] do
+       sh "mkdir -p dist"
+
+       sh "cat " + files.map {|file| "src/" + file + ".js"}.join(" ") +
+               " | sed 's/Date:./&" + date + "/' | " +
+               " sed s/@VERSION/" + version + "/ > dist/jquery2.js"
+end
+
+task :selector do
+       sh "sed '/EXPOSE/r src/sizzle-jquery.js' src/sizzle/sizzle.js > src/selector.js"
+end