Skip to content

Commit

Permalink
output regenerated file paths to terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Oct 24, 2017
1 parent 9c1cfc3 commit 2383a61
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/jekyll/watcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,21 @@ def listen_handler(site)
t = Time.now
c = modified + added + removed
n = c.length
print Jekyll.logger.message("Regenerating:",
"#{n} file(s) changed at #{t.strftime("%Y-%m-%d %H:%M:%S")} ")
Jekyll.logger.info "Regenerating:",
"#{n} file(s) changed at #{t.strftime("%Y-%m-%d %H:%M:%S")}"

c.map { |path| site.in_source_dir(path) }.each do |file|
Jekyll.logger.info "", file
end

begin
site.process
puts "...done in #{Time.now - t} seconds."
Jekyll.logger.info "", "...done in #{Time.now - t} seconds."
rescue => e
puts "...error:"
Jekyll.logger.warn "Error:", e.message
Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information."
end
puts ""
end
end

Expand Down

0 comments on commit 2383a61

Please # to comment.