Skip to content

Commit

Permalink
promote back some of the files to core
Browse files Browse the repository at this point in the history
  • Loading branch information
ippa committed Aug 29, 2013
1 parent fb5d490 commit 1ae95ae
Show file tree
Hide file tree
Showing 10 changed files with 4,689 additions and 3,844 deletions.
11 changes: 7 additions & 4 deletions build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
#
# Build a standalone, all-including jaws.js by combining all the files in src/-directory into one
#
files = ["core.js","input.js","assets.js","game_loop.js","rect.js","sprite.js","sprite_sheet.js","animation.js","viewport.js","collision_detection.js", "gfx.js"]
extras = ["audio.js", "quadtree.js", "parallax.js", "pixel_map.js", "sprite_list.js", "tile_map.js", "tile_map_pathfinding.js"]
#files = ["core.js","input.js","assets.js","game_loop.js","rect.js","sprite.js","sprite_sheet.js","animation.js","viewport.js","collision_detection.js","parallax.js","tile_map.js","quadtree.js", "gfx.js"]
#extras = ["audio.js", "quadtree.js", "pixel_map.js", "sprite_list.js", "tile_map_pathfinding.js"]

files = Dir['src/*'].select { |f| !File.directory?(f) }
extras = Dir['src/extras/*'].select { |f| !File.directory?(f) }

File.open("jaws.js", "w") do |out|
out.write("/* Built at #{Time.now.to_s} */\n")
files.each { |file| out.write( File.read("src/#{file}") ) }
files.each { |file| out.write( File.read(file) ) }
out.write(";window.addEventListener(\"load\", function() { if(jaws.onload) jaws.onload(); }, false);")
end

File.open("extras.js", "w") do |out|
out.write("/* Built at #{Time.now.to_s} */\n")
extras.each { |file| out.write( File.read("src/extras/#{file}") ) }
extras.each { |file| out.write( File.read(file) ) }
end


Expand Down
63 changes: 21 additions & 42 deletions extras-min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1ae95ae

Please sign in to comment.