Class: Appmake::Listeners::Js
- Inherits:
-
Object
- Object
- Appmake::Listeners::Js
- Defined in:
- lib/appmake/listeners/js.rb
Class Method Summary collapse
Class Method Details
.listen(bg = false) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/appmake/listeners/js.rb', line 6 def self.listen(bg = false) callback = Proc.new do |modified, added, removed| puts "=> rebuilding JS" system("node bin/compile_templates.js") end listener = Listen.to "js", :filter => /\.js$/ listener.change(&callback) listener.start(bg) end |