try win32-process gem
This commit is contained in:
parent
9e3830cf7b
commit
0fb9900ddb
|
@ -1,5 +1,4 @@
|
||||||
require 'thor'
|
require 'thor'
|
||||||
require 'rbconfig'
|
|
||||||
|
|
||||||
module Middleman
|
module Middleman
|
||||||
class CLI < Thor
|
class CLI < Thor
|
||||||
|
@ -39,19 +38,14 @@ module Middleman
|
||||||
def server
|
def server
|
||||||
v1_check
|
v1_check
|
||||||
|
|
||||||
if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
|
if options["livereload"]
|
||||||
::Middleman.start_server(options)
|
livereload_options = {:port => options["livereload-port"]}
|
||||||
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)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Middleman::Guard.start({
|
||||||
|
:port => options[:port],
|
||||||
|
:environment => options[:environment]
|
||||||
|
}, livereload_options)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "build", "Builds the static site for deployment"
|
desc "build", "Builds the static site for deployment"
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
require "guard"
|
require "guard"
|
||||||
require "guard/guard"
|
require "guard/guard"
|
||||||
require "guard/livereload"
|
require "guard/livereload"
|
||||||
require "webrick"
|
require "rbconfig"
|
||||||
|
|
||||||
|
if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
|
||||||
|
require "win32/process"
|
||||||
|
end
|
||||||
|
|
||||||
module Middleman::Guard
|
module Middleman::Guard
|
||||||
def self.start(options={}, livereload={})
|
def self.start(options={}, livereload={})
|
||||||
|
|
|
@ -56,11 +56,13 @@ eos
|
||||||
|
|
||||||
case Config::CONFIG['host_os'].downcase
|
case Config::CONFIG['host_os'].downcase
|
||||||
when %r{mswin|mingw}
|
when %r{mswin|mingw}
|
||||||
else
|
# s.add_runtime_dependency "windows-api", "= 0.4.0"
|
||||||
s.add_runtime_dependency("guard", ["~> 0.5.1"])
|
# s.add_runtime_dependency "windows-pr", "= 1.1.2"
|
||||||
s.add_runtime_dependency("guard-livereload", ["~> 0.3.0"])
|
s.add_runtime_dependency("win32-process", ["~> 0.6.5"])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
s.add_runtime_dependency("guard", ["~> 0.5.1"])
|
||||||
|
s.add_runtime_dependency("guard-livereload", ["~> 0.3.0"])
|
||||||
s.add_development_dependency("coffee-filter", ["~> 0.1.1"])
|
s.add_development_dependency("coffee-filter", ["~> 0.1.1"])
|
||||||
s.add_development_dependency("cucumber", ["~> 1.0.2"])
|
s.add_development_dependency("cucumber", ["~> 1.0.2"])
|
||||||
s.add_development_dependency("rake", ["0.8.7"])
|
s.add_development_dependency("rake", ["0.8.7"])
|
||||||
|
|
Loading…
Reference in a new issue