hide webrick logs, disable livereload by default
This commit is contained in:
parent
f585a11d66
commit
506148ae8a
|
@ -15,7 +15,7 @@ module Middleman
|
|||
|
||||
class_option :port, :aliases => "-p", :default => "4567"
|
||||
class_option :"livereload-port", :default => "35729"
|
||||
class_option :"livereload", :default => true, :type => :boolean
|
||||
class_option :"livereload", :default => false, :type => :boolean
|
||||
|
||||
def start_guard
|
||||
if !File.exists?("config.rb")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require "guard"
|
||||
require "guard/guard"
|
||||
require "guard/livereload"
|
||||
require "webrick"
|
||||
|
||||
module Middleman::Guard
|
||||
def self.start(options={}, livereload={})
|
||||
|
@ -53,12 +54,17 @@ module Guard
|
|||
|
||||
private
|
||||
def server_start
|
||||
puts "== The Middleman is standing watch on port #{@options[:port]}"
|
||||
@server_options = { :Port => @options[:port], :AccessLog => [] }
|
||||
@server_options = {
|
||||
:Port => @options[:port],
|
||||
:Logger => ::WEBrick::Log.new('/dev/null'),
|
||||
:AccessLog => ::WEBrick::Log.new('/dev/null')
|
||||
}
|
||||
@server_job = fork do
|
||||
@server_options[:app] = ::Middleman.server.new
|
||||
::Rack::Server.new(@server_options).start
|
||||
end
|
||||
|
||||
puts "== The Middleman is standing watch on port #{@options[:port]}"
|
||||
end
|
||||
|
||||
def server_stop
|
||||
|
|
Loading…
Reference in a new issue