lib/polymer/sass_generator.rb in polymer-1.0.0.beta.4 vs lib/polymer/sass_generator.rb in polymer-1.0.0.beta.5

- old
+ new

@@ -25,9 +25,15 @@ else project.sass.mkpath save_to = project.sass + '_polymer.sass' end + data_uris = project.data_uri_sprites.inject({}) do |memo, sprite| + data = [sprite.save_path.read].pack('m').strip + memo[sprite.name] = "data:image/png;base64,#{data}" + memo + end + File.open(save_to, 'w') do |file| file.puts ERB.new(File.read(TEMPLATE), nil, '<>').result(binding) end true