lib/nanoc/cli/commands/create-site.rb in nanoc-4.11.0 vs lib/nanoc/cli/commands/create-site.rb in nanoc-4.11.1
- old
+ new
@@ -20,11 +20,11 @@
DEFAULT_CONFIG = <<~EOS unless defined? DEFAULT_CONFIG
# A list of file extensions that Nanoc will consider to be textual rather than
# binary. If an item with an extension not in this list is found, the file
# will be considered as binary.
- text_extensions: #{array_to_yaml(Nanoc::Int::Configuration::DEFAULT_CONFIG[:text_extensions])}
+ text_extensions: #{array_to_yaml(Nanoc::Core::Configuration::DEFAULT_CONFIG[:text_extensions])}
prune:
auto_prune: true
data_sources:
@@ -225,15 +225,10 @@
"The site was not created because '#{path}' already exists. " \
'Re-run the command using --force to create the site anyway.',
)
end
- # Setup notifications
- Nanoc::Int::NotificationCenter.on(:file_created) do |file_path|
- Nanoc::CLI::Logger.instance.file(:high, :create, file_path)
- end
-
# Build entire site
FileUtils.mkdir_p(path)
FileUtils.cd(File.join(path)) do
FileUtils.mkdir_p('content')
FileUtils.mkdir_p('layouts')
@@ -252,10 +247,10 @@
private
def write(filename, content)
File.write(filename, content)
- Nanoc::Int::NotificationCenter.post(:file_created, filename)
+ Nanoc::CLI::Logger.instance.file(:high, :create, filename)
end
end
end
runner Nanoc::CLI::Commands::CreateSite