try win32-process gem
This commit is contained in:
parent
9e3830cf7b
commit
0fb9900ddb
3 changed files with 17 additions and 17 deletions
|
@ -1,5 +1,4 @@
|
|||
require 'thor'
|
||||
require 'rbconfig'
|
||||
|
||||
module Middleman
|
||||
class CLI < Thor
|
||||
|
@ -39,19 +38,14 @@ module Middleman
|
|||
def server
|
||||
v1_check
|
||||
|
||||
if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
|
||||
::Middleman.start_server(options)
|
||||
puts "== The Middleman is standing watch on port #{options[:port]}"
|
||||
else
|
||||
if options["livereload"]
|
||||
livereload_options = {:port => options["livereload-port"]}
|
||||
end
|
||||
|
||||
Middleman::Guard.start({
|
||||
:port => options[:port],
|
||||
:environment => options[:environment]
|
||||
}, livereload_options)
|
||||
if options["livereload"]
|
||||
livereload_options = {:port => options["livereload-port"]}
|
||||
end
|
||||
|
||||
Middleman::Guard.start({
|
||||
:port => options[:port],
|
||||
:environment => options[:environment]
|
||||
}, livereload_options)
|
||||
end
|
||||
|
||||
desc "build", "Builds the static site for deployment"
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
require "guard"
|
||||
require "guard/guard"
|
||||
require "guard/livereload"
|
||||
require "webrick"
|
||||
require "rbconfig"
|
||||
|
||||
if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
|
||||
require "win32/process"
|
||||
end
|
||||
|
||||
module Middleman::Guard
|
||||
def self.start(options={}, livereload={})
|
||||
options_hash = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue