appmake 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/appmake.rb +13 -7
  2. data/lib/appmake/version.rb +1 -1
  3. metadata +1 -1
@@ -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/*.coffee" do |f|
90
- name = f.split("/").last
91
- new_name = name.gsub "coffee", "js"
92
- run "./node_modules/.bin/coffee -c coffee/#{name}"
93
- run "mv coffee/#{new_name} js/#{new_name}"
94
- if name[0] == name[0].upcase
95
- run "./node_modules/.bin/webmake js/#{new_name} public/js/#{new_name}"
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
@@ -1,3 +1,3 @@
1
1
  module Appmake
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: