debug flag
This commit is contained in:
parent
9bfd345849
commit
d018511606
|
@ -57,12 +57,17 @@ module Middleman
|
|||
:aliases => "-p",
|
||||
:default => "4567",
|
||||
:desc => "The port Middleman will listen on"
|
||||
method_option "debug",
|
||||
:type => :boolean,
|
||||
:default => false,
|
||||
:desc => 'Print debug messages'
|
||||
def server
|
||||
v1_check
|
||||
|
||||
params = {
|
||||
:port => options[:port],
|
||||
:environment => options[:environment]
|
||||
:port => options["port"],
|
||||
:environment => options["environment"],
|
||||
:debug => options["debug"]
|
||||
}
|
||||
|
||||
puts "== The Middleman is loading"
|
||||
|
|
|
@ -23,6 +23,7 @@ module Middleman
|
|||
options_hash << ", :#{k} => '#{v}'"
|
||||
end
|
||||
|
||||
$stderr.puts options_hash.inspect
|
||||
guardfile_contents = %Q{
|
||||
guard 'middleman'#{options_hash} do
|
||||
watch(%r{(.*)})
|
||||
|
@ -81,6 +82,7 @@ module Guard
|
|||
def server_start
|
||||
app = ::Middleman.server
|
||||
app.set :environment, @options[:environment].to_sym
|
||||
app.set :logging, @options[:debug] == "true"
|
||||
|
||||
puts "== The Middleman is standing watch on port #{@options[:Port]||4567}"
|
||||
@app = app.new!
|
||||
|
|
Loading…
Reference in a new issue