Permalink
Browse files

Cleaned up Rakefile

  • Loading branch information...
1 parent f0bfae1 commit 6ca0a65b3716f525197f17d0998422cd64a32ba8 Tobias Schneider committed Feb 19, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 Rakefile
View
@@ -1,18 +1,20 @@
src_dir = 'src'
+vendor_dir = 'vendor'
dist_dir = 'dist'
build_dir = 'build'
base_names = [ 'base', 'movie', 'parser', 'stream', 'svg_renderer', 'vendor' ]
base_files = base_names.map { |file| File.join(src_dir, file + '.js') }
intro = File.join(src_dir, 'intro.js')
outro = File.join(src_dir, 'outro.js')
+vendor = File.join(src_dir, 'vendor.js')
output_file = File.join(dist_dir, 'gordon.js')
output_file_min = File.join(dist_dir, 'gordon.min.js')
compiler = File.join(build_dir, 'compiler.jar')
task :default => :min
task :gordon do
- sh 'cat vendor/* > ' + File.join(src_dir, 'vendor.js')
+ sh 'cat ' + File.join(vendor_dir, '*') + ' > ' + vendor
sh 'mkdir -p ' + dist_dir
sh 'cat ' + intro + ' > ' + output_file
sh 'for file in ' + base_files.join(' ') + "; do echo | cat $file - | sed 's/^/\t/' >> " + output_file + '; done'
@@ -26,5 +28,5 @@ end
task :clean do
sh 'rm -rf ' + dist_dir
- sh 'rm src/vendor.js'
+ sh 'rm ' + vendor
end

0 comments on commit 6ca0a65

Please sign in to comment.