lib/autoprefixer-rails/sprockets.rb in autoprefixer-rails-5.1.11 vs lib/autoprefixer-rails/sprockets.rb in autoprefixer-rails-5.2.0
- old
+ new
@@ -9,11 +9,16 @@
# Add prefixes for `css`
def process(context, css, opts)
input = context.pathname.to_s
output = input.chomp(File.extname(input)) + '.css'
+ result = @processor.process(css, opts.merge(from: input, to: output))
- @processor.process(css, opts.merge(from: input, to: output)).css
+ result.warnings.each do |warning|
+ $stderr.puts "autoprefixer: #{ warning }"
+ end
+
+ result.css
end
# Register postprocessor in Sprockets depend on issues with other gems
def install(assets, opts = {})
assets.register_postprocessor('text/css', :autoprefixer) do |context, css|