lib/linner/command.rb in linner-0.6.1 vs lib/linner/command.rb in linner-0.6.2

- old
+ new

@@ -45,10 +45,11 @@ def watch trap(:INT) { exit! } clean Linner::Bundler.new(env.bundles).perform perform + watch_for_env watch_for_perform watch_for_reload sleep end @@ -87,9 +88,17 @@ def watch_for_reload reactor = Reactor.supervise_as(:reactor).actors.first Listen.to env.public_folder, relative_path: true do |modified, added, removed| reactor.reload_browser(modified + added + removed) + end + end + + def watch_for_env + Listen.to Linner.root, filter: /(config\.yml|Linnerfile)$/ do |modified, added, removed| + Linner.env = Environment.new Linner.config_file + Linner::Bundler.new(env.bundles).perform + perform end end def exit! Notifier.exit