Skip to content
Permalink
Browse files

Adding a Rakefile to build jQuery core, for those that need it.

  • Loading branch information
jeresig committed Nov 29, 2009
1 parent 1879e8c commit e00be67f32f0f82421cefd9c7a715360f9db1f8b
Showing with 19 additions and 0 deletions.
  1. +19 −0 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

1 comment on commit e00be67

@mislav

This comment has been minimized.

Copy link

@mislav mislav commented on e00be67 Nov 30, 2009

Great. I was wondering why it wasn't there before

Please sign in to comment.
You can’t perform that action at this time.