def run
puts "Loading site data..."
self.require_site
if options.has_key?(:all) || options.has_key?(:force)
$stderr.puts "Warning: the --force option (and its deprecated --all alias) are, as of nanoc 3.2, no longer supported and have no effect."
end
if arguments.size == 1
$stderr.puts '-' * 80
$stderr.puts 'Note: As of nanoc 3.2, it is no longer possible to compile a single item. When invoking the “compile” command, all items in the site will be compiled.'
$stderr.puts '-' * 80
end
puts "Compiling site..."
time_before = Time.now
@rep_times = {}
@filter_times = {}
setup_notifications
setup_diffs
self.site.compile
reps = self.site.items.map { |i| i.reps }.flatten
reps.select { |r| !r.compiled? }.each do |rep|
rep.raw_paths.each do |snapshot_name, filename|
next if filename.nil?
duration = @rep_times[filename]
Nanoc::CLI::Logger.instance.file(:high, :skip, filename, duration)
end
end
teardown_diffs
if self.site.config[:auto_prune]
Nanoc::Extra::Pruner.new(self.site).run
end
puts
puts "Site compiled in #{format('%.2f', Time.now - time_before)}s."
if options.has_key?(:verbose)
print_profiling_feedback(reps)
end
end