lib/nanoc/cli/command_runner.rb in nanoc-4.2.0 vs lib/nanoc/cli/command_runner.rb in nanoc-4.2.1

- old
+ new

@@ -42,15 +42,19 @@ alias is_in_site_dir? in_site_dir? # Asserts that the current working directory contains a site and loads the site into memory. # # @return [void] - def load_site + def load_site(preprocess: false) print 'Loading siteā€¦ ' $stdout.flush if site.nil? raise ::Nanoc::Int::Errors::GenericTrivial, 'The current working directory does not seem to be a Nanoc site.' + end + + if preprocess + site.compiler.action_provider.preprocess(site) end puts 'done' end