Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add coffee->js build rules

  • Loading branch information...
commit f4b58ef3367d35aff7bbda35e82368bb0ceed1af 1 parent 8bc353e
@andreyvit andreyvit authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 Rakefile
View
11 Rakefile
@@ -8,8 +8,16 @@ VERSION_FILES = %w(
src/connector.coffee
)
+def coffee dst, src
+ sh 'coffee', '-c', '-b', '-o', File.dirname(dst), src
+end
+
COFFEE.each do |coffee|
JS << (js = File.join('lib', File.basename(coffee).ext('js')))
+
+ file js => [coffee] do
+ coffee js, coffee
+ end
end
class JSModule
@@ -68,7 +76,7 @@ def subst_version_refs_in_file file, ver
end
file DIST => JS do
-
+ puts "CONCAT #{DIST}"
modules = {}
JS.each do |js|
mod = JSModule.new(js)
@@ -126,3 +134,4 @@ end
task :default => :build
CLOBBER << DIST
+CLEAN.include *JS
Please sign in to comment.
Something went wrong with that request. Please try again.