lib/stack/runner.rb in stack-0.0.5 vs lib/stack/runner.rb in stack-0.0.6

- old
+ new

@@ -36,9 +36,25 @@ end # Runs the specified command def run_command @generator = Stack::Generator.new(Stack::runner.configuration.source, Stack::runner.configuration.target) - @generator.transform! + + case self.command + when /(generate|gen)/ + @generator.transform! + when /(server)/ + # make a watcher + watcher = Stack::Watcher.new(@generator) + watcher.keep_alive = false + watcher.observe + # and a server + server = Stack::Server.new(@generator) + server.observe + when /(watch)/ + # setup a watcher + watcher = Stack::Watcher.new(@generator) + watcher.observe + end end end end \ No newline at end of file