Module: Jekyll::Commands::Watch

Extended by:
Watch
Included in:
Watch
Defined in:
lib/jekyll/commands/watch.rb

Instance Method Summary collapse

Instance Method Details

#init_with_program(prog) ⇒ Object



6
7
# File 'lib/jekyll/commands/watch.rb', line 6

def init_with_program(prog)
end

#process(options) ⇒ Object

Build your jekyll site Continuously watch if ‘watch` is set to true in the config.



11
12
13
14
# File 'lib/jekyll/commands/watch.rb', line 11

def process(options)
  Jekyll.logger.log_level = :error if options['quiet']
  watch(site, options) if options['watch']
end

#watch(site, options) ⇒ Object

Watch for file changes and rebuild the site.

site - A Jekyll::Site instance options - A Hash of options passed to the command

Returns nothing.



22
23
24
# File 'lib/jekyll/commands/watch.rb', line 22

def watch(site, options)
  Jekyll::Watcher.watch(options)
end