lib/jsduck/output_dir.rb in jsduck-5.3.4 vs lib/jsduck/output_dir.rb in jsduck-6.0.0beta

- old
+ new

@@ -9,21 +9,21 @@ # Initializes empty output directory (with optional .cache inside). def self.clean(opts) if opts.cache && cache_dir_needs_preserving(opts) # Remove all files inside <output-dir> except .cache/ - Dir[opts.output_dir + "/*"].each do |file| + Dir[opts.output + "/*"].each do |file| FileUtils.rm_rf(file) unless file =~ /\/.cache\z/ end else # Remove and recreate the entire <output-dir> - FileUtils.rm_rf(opts.output_dir) - FileUtils.mkdir(opts.output_dir) + FileUtils.rm_rf(opts.output) + FileUtils.mkdir(opts.output) end end def self.cache_dir_needs_preserving(opts) - opts.cache_dir == opts.output_dir + "/.cache" && File.exists?(opts.cache_dir) + opts.cache_dir == opts.output + "/.cache" && File.exists?(opts.cache_dir) end end end