lib/linner/command.rb in linner-0.1.2 vs lib/linner/command.rb in linner-0.1.3
- old
+ new
@@ -16,36 +16,26 @@
end
end
desc "watch", "watch assets"
def watch
- @reactor = Reactor.new
+ trap :INT do
+ Notifier.exit
+ exit!
+ end
@proc = Proc.new do |modified, added, removed|
begin
Notifier.info{ Linner.perform }
rescue
Notifier.error $!
end
end
@proc.call
- Listen.to env.app_folder, env.vendor_folder, env.test_folder do |modified, added, removed|
+ Listen.to! env.app_folder, env.vendor_folder, env.test_folder do |modified, added, removed|
@proc.call
end
-
- Listen.to env.public_folder, :relative_paths => true do |modified, added, removed|
- paths = [].push(modified, added, removed).flatten.compact
- @reactor.reload_browser(paths)
- end
-
- trap :INT do
- Notifier.exit
- @reactor.stop
- exit!
- end
-
- sleep
end
desc "clean", "clean assets"
def clean
FileUtils.rm_rf Dir.glob("#{Linner.environment.public_folder}/*")