Make middleman's preview server a daemon
This commit is contained in:
parent
916a5a508b
commit
8c7e156bd4
2 changed files with 20 additions and 1 deletions
|
@ -49,6 +49,11 @@ module Middleman::Cli
|
|||
aliases: '-l',
|
||||
default: 0.5,
|
||||
desc: 'Set file watcher latency, in seconds'
|
||||
class_option :daemon,
|
||||
type: :boolean,
|
||||
aliases: '-d',
|
||||
default: false,
|
||||
desc: 'Daemonize preview server'
|
||||
|
||||
# Start the server
|
||||
def server
|
||||
|
@ -73,7 +78,8 @@ module Middleman::Cli
|
|||
disable_watcher: options['disable_watcher'],
|
||||
reload_paths: options['reload_paths'],
|
||||
force_polling: options['force_polling'],
|
||||
latency: options['latency']
|
||||
latency: options['latency'],
|
||||
daemon: options['daemon']
|
||||
}
|
||||
|
||||
puts '== The Middleman is loading'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue