diff --git a/lib/jekyll/command.rb b/lib/jekyll/command.rb index d11631d8..bf6d981d 100644 --- a/lib/jekyll/command.rb +++ b/lib/jekyll/command.rb @@ -19,31 +19,6 @@ module Jekyll super(base) end - # Paths to ignore for the watch option - # - # options - A Hash of options passed to the command - # - # Returns a list of relative paths from source that should be ignored - def ignore_paths(options) - source = options['source'] - destination = options['destination'] - config_files = Configuration[options].config_files(options) - paths = config_files + Array(destination) - ignored = [] - - source_abs = Pathname.new(source).expand_path - paths.each do |p| - path_abs = Pathname.new(p).expand_path - begin - rel_path = path_abs.relative_path_from(source_abs).to_s - ignored << Regexp.new(Regexp.escape(rel_path)) unless rel_path.start_with?('../') - rescue ArgumentError - # Could not find a relative path - end - end - ignored - end - # Run Site#process and catch errors # # site - the Jekyll::Site object diff --git a/lib/jekyll/commands/build.rb b/lib/jekyll/commands/build.rb index cbda2b65..6dc900c6 100644 --- a/lib/jekyll/commands/build.rb +++ b/lib/jekyll/commands/build.rb @@ -64,7 +64,7 @@ module Jekyll # Returns nothing. def watch(site, options) Deprecator.gracefully_require 'jekyll-watch' - Jekyll::Commands::Watch.watch(site, options) + Jekyll::Watch.watch(options) end end # end of class << self