lib/smallvictories/compiler.rb in smallvictories-0.0.7 vs lib/smallvictories/compiler.rb in smallvictories-0.0.8

- old
+ new

@@ -29,11 +29,11 @@ if File.exists?(layout_path) layout_file = File.open(layout_path).read layout = Liquid::Template.parse(layout_file) end rescue => e - SmallVictories.logger.error "Liquid Error\n#{e}" + SmallVictories.logger.error "Liquid Error\n#{e}\n#{e.backtrace.first}" return end Dir.glob([File.join(config.full_source_path, '*.html'), File.join(config.full_source_path, '*.liquid')]) do |path| begin @@ -53,11 +53,11 @@ end Dir.mkdir(config.full_destination_path) unless File.exists?(config.full_destination_path) File.open(File.join(config.full_destination_path, output_file_name), 'w') { |file| file.write(html) } SmallVictories.logger.info "compiled #{config.destination}/#{output_file_name}" rescue => e - SmallVictories.logger.error "#{path}\n#{e}" + SmallVictories.logger.error "#{path}\n#{e}\n#{e.backtrace.first}" end end end def package bundles=[config.stylesheets, config.javascripts], options={} @@ -75,11 +75,11 @@ FileUtils.mkpath config.full_destination_path assets.write_to File.join(config.full_destination_path, bundle.last) SmallVictories.logger.info "compiled #{File.join(config.destination, bundle.last)}" end rescue => e - SmallVictories.logger.error "#{bundle}\n#{e}" + SmallVictories.logger.error "#{bundle.first}\n#{e}\n#{e.backtrace.first}" end end end def prefix_css @@ -96,10 +96,10 @@ if assets = sprockets.find_asset(config.stylesheets.last) assets.write_to File.join(config.full_destination_path, config.stylesheets.last) SmallVictories.logger.info "prefixed #{config.destination}/#{config.stylesheets.last}" end rescue => e - SmallVictories.logger.error "#{path}\n#{e}" + SmallVictories.logger.error "#{path}\n#{e}\n#{e.backtrace.first}" end end def minify_css package [config.stylesheets]