Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add rake task for replacing url() with image-url() in scss
  • Loading branch information
s-andringa committed Oct 5, 2012
1 parent be3586b commit d327b60
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Rakefile
@@ -1 +1,13 @@
require "bundler/gem_tasks"

desc "Fixes css image paths in scss files."
task :fix_css do
Dir.glob(File.join("vendor/assets/stylesheets/dataTables", "*.css.scss")).each do |filename|
content = File.read(filename)
content.gsub!(/url\('\.\.\/images\/([A-Za-z0-9_]*\.png)'\)/) do
"image-url('dataTables/#{$1}')"
end
File.open(filename, 'w') { |f| f << content }
end
print "Done.\n"
end

0 comments on commit d327b60

Please sign in to comment.