# File lib/nanoc/cli/commands/compile.rb, line 384 def run time_before = Time.now load_site check_for_deprecated_usage puts 'Compiling site…' run_listeners_while do site.compile 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 447 def check_for_deprecated_usage # Check presence of --all option if options.key?(:all) || options.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 409 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 427 def listeners @listeners end
# File lib/nanoc/cli/commands/compile.rb, line 403 def prune if site.config[:prune][:auto_prune] Nanoc::Extra::Pruner.new(site, :exclude => prune_config_exclude).run end end
# File lib/nanoc/cli/commands/compile.rb, line 461 def prune_config site.config[:prune] || {} end
# File lib/nanoc/cli/commands/compile.rb, line 465 def prune_config_exclude prune_config[:exclude] || {} end
# File lib/nanoc/cli/commands/compile.rb, line 442 def reps site.items.map { |i| i.reps }.flatten end
# File lib/nanoc/cli/commands/compile.rb, line 431 def run_listeners_while setup_listeners yield ensure teardown_listeners end
Generated with the Darkfish Rdoc Generator 2.