# File lib/nanoc/cli/commands/compile.rb, line 354 def run time_before = Time.now self.load_site self.check_for_deprecated_usage puts "Compiling site…" self.run_listeners_while do self.site.compile self.prune end time_after = Time.now puts puts "Site compiled in #{format('%.2f', time_after - time_before)}s." end
# File lib/nanoc/cli/commands/compile.rb, line 417 def check_for_deprecated_usage # Check presence of --all option 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 # Warn if trying to compile a single item 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 end
# File lib/nanoc/cli/commands/compile.rb, line 379 def default_listener_classes [ Nanoc::CLI::Commands::Compile::DiffGenerator, Nanoc::CLI::Commands::Compile::DebugPrinter, Nanoc::CLI::Commands::Compile::TimingRecorder, Nanoc::CLI::Commands::Compile::GCController, Nanoc::CLI::Commands::Compile::FileActionPrinter ] end
# File lib/nanoc/cli/commands/compile.rb, line 397 def listeners @listeners end
# File lib/nanoc/cli/commands/compile.rb, line 373 def prune if self.site.config[:prune][:auto_prune] Nanoc::Extra::Pruner.new(self.site, :exclude => self.prune_config_exclude).run end end
# File lib/nanoc/cli/commands/compile.rb, line 431 def prune_config self.site.config[:prune] || {} end
# File lib/nanoc/cli/commands/compile.rb, line 435 def prune_config_exclude self.prune_config[:exclude] || {} end
# File lib/nanoc/cli/commands/compile.rb, line 412 def reps self.site.items.map { |i| i.reps }.flatten end
# File lib/nanoc/cli/commands/compile.rb, line 401 def run_listeners_while self.setup_listeners yield ensure self.teardown_listeners end
Generated with the Darkfish Rdoc Generator 2.