appmake 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/appmake.rb +13 -7
- data/lib/appmake/version.rb +1 -1
- metadata +1 -1
data/lib/appmake.rb
CHANGED
@@ -86,13 +86,19 @@ module Appmake
|
|
86
86
|
elsif name == "tpl"
|
87
87
|
run "./node_modules/.bin/dot-module -d tpl/ -o js/templates.js"
|
88
88
|
elsif name == "coffee"
|
89
|
-
Dir.glob "coffee
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
89
|
+
Dir.glob(File.join("**", "coffee", "**", "*.coffee")) do |f|
|
90
|
+
run "./node_modules/.bin/coffee -c #{f}"
|
91
|
+
coffee_dir = f.gsub(f.split("/").last, "")
|
92
|
+
js_dir = coffee_dir.gsub "coffee", "js"
|
93
|
+
empty_directory js_dir
|
94
|
+
js_file = f.gsub "coffee", "js"
|
95
|
+
run "mv #{f.gsub('.coffee', '.js')} #{js_file}"
|
96
|
+
|
97
|
+
Dir.glob "js/*.js" do |js|
|
98
|
+
name = js.split("/").last
|
99
|
+
if name[0] == name[0].upcase
|
100
|
+
run "./node_modules/.bin/webmake #{js} public/js/#{name}"
|
101
|
+
end
|
96
102
|
end
|
97
103
|
end
|
98
104
|
end
|
data/lib/appmake/version.rb
CHANGED