Skip to content

Commit

Permalink
Update Rakefile to remove module wrappers (feature parity with make a…
Browse files Browse the repository at this point in the history
…nd ant). Update Makefile to avoid rebuilding jquery.js when it is not necessary to do so.
  • Loading branch information
Jonas Pfenniger authored and csnover committed Dec 30, 2010
1 parent 4eeae8b commit c1625f6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -79,7 +79,7 @@ init:
jquery: ${JQ}
jq: ${JQ}

${JQ}: ${MODULES} ${DIST_DIR}
${JQ}: ${MODULES} | ${DIST_DIR}
@@echo "Building" ${JQ}

@@cat ${MODULES} | \
Expand Down
29 changes: 27 additions & 2 deletions Rakefile
Expand Up @@ -9,7 +9,28 @@ 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
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" )
Expand Down Expand Up @@ -89,7 +110,11 @@ 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/, date).gsub(/@VERSION/, version)
f.write cat(base_files).
gsub(/@DATE/, date).
gsub(/@VERSION/, version).
gsub(/.function..jQuery...\{/, '').
gsub(/\}...jQuery..;/, '')
end
end

Expand Down

0 comments on commit c1625f6

Please sign in to comment.