Compass & Autoprefixer Gem install -


using guide, still unable install auto-prefixer using gem compass:

https://github.com/postcss/autoprefixer#compass

gem install autoprefixer-rails , add post-compile hook config.rb:  require 'autoprefixer-rails'  on_stylesheet_saved |file|   css = file.read(file)   file.open(file, 'w') |io|     io << autoprefixerrails.process(css)   end end 

does matter directory in when type 'gem install autoprefixer-rails? should in directory call 'compass watch'?

i added function config.rb compass still not compiling autoprefixer.

try in config.rb project file:

require 'autoprefixer-rails'  on_stylesheet_saved |file|   css = file.read(file)   map = file + '.map'    if file.exists? map     result = autoprefixerrails.process(css,       from: file,       to:   file,       map:  { prev: file.read(map), inline: false })     file.open(file, 'w') { |io| io << result.css }     file.open(map,  'w') { |io| io << result.map }   else     file.open(file, 'w') { |io| io << autoprefixerrails.process(css) }   end end 

worked me when koala started acting me.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -