lib/nanoc/cli/commands/compile.rb in nanoc-4.3.2 vs lib/nanoc/cli/commands/compile.rb in nanoc-4.3.3
- old
+ new
@@ -12,11 +12,11 @@
IDENTICAL - The item was deemed outdated and has been recompiled, but the compiled version turned out to be identical to the already existing version
SKIP - The item was deemed not outdated and was therefore not recompiled
EOS
-flag nil, :profile, 'profile compilation' if Nanoc::Feature.enabled?('PROFILER')
+flag nil, :profile, 'profile compilation' if Nanoc::Feature.enabled?(Nanoc::Feature::PROFILER)
module Nanoc::CLI::Commands
class Compile < ::Nanoc::CLI::CommandRunner
# Listens to compilation events and reacts to them. This abstract class
# does not have a real implementation; subclasses should override {#start}
@@ -402,26 +402,19 @@
load_site
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
protected
- def prune
- if site.config[:prune][:auto_prune]
- Nanoc::Extra::Pruner.new(site, exclude: prune_config_exclude).run
- end
- end
-
def default_listener_classes
[
Nanoc::CLI::Commands::Compile::DiffGenerator,
Nanoc::CLI::Commands::Compile::DebugPrinter,
Nanoc::CLI::Commands::Compile::TimingRecorder,
@@ -455,17 +448,9 @@
@listeners.each(&:stop_safely)
end
def reps
site.compiler.reps
- end
-
- def prune_config
- site.config[:prune] || {}
- end
-
- def prune_config_exclude
- prune_config[:exclude] || {}
end
end
end
runner Nanoc::CLI::Commands::Compile