appmake 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/appmake.rb +1 -2
- data/lib/appmake/listeners/js.rb +6 -8
- data/lib/appmake/version.rb +1 -1
- metadata +1 -1
data/lib/appmake.rb
CHANGED
data/lib/appmake/listeners/js.rb
CHANGED
@@ -3,17 +3,15 @@ require "listen"
|
|
3
3
|
module Appmake
|
4
4
|
module Listeners
|
5
5
|
class Js
|
6
|
-
def
|
7
|
-
|
8
|
-
listener.change(&callback)
|
9
|
-
listener
|
10
|
-
end
|
11
|
-
|
12
|
-
def callback
|
13
|
-
Proc.new do |modified, added, removed|
|
6
|
+
def self.listen(bg = false)
|
7
|
+
callback = Proc.new do |modified, added, removed|
|
14
8
|
puts "=> rebuilding JS"
|
15
9
|
system("node bin/compile_templates.js")
|
16
10
|
end
|
11
|
+
|
12
|
+
listener = Listen.to "js", :filter => /\.js$/
|
13
|
+
listener.change(&callback)
|
14
|
+
listener.start(bg)
|
17
15
|
end
|
18
16
|
end
|
19
17
|
end
|
data/lib/appmake/version.rb
CHANGED