compass-img-delivery 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/img-delivery/functions.rb +22 -1
- metadata +1 -1
@@ -41,6 +41,25 @@ module Compass::ImgDelivery
|
|
41
41
|
end
|
42
42
|
|
43
43
|
|
44
|
+
# module Compass
|
45
|
+
# module SassExtensions
|
46
|
+
# module Sprites
|
47
|
+
# class Pep < Compass::SassExtensions::Sprites::Engine
|
48
|
+
|
49
|
+
# def construct_sprite
|
50
|
+
# puts "construct_sprite"
|
51
|
+
# end
|
52
|
+
|
53
|
+
# def save(filename)
|
54
|
+
# puts "save #{filename}"
|
55
|
+
# end
|
56
|
+
|
57
|
+
# end
|
58
|
+
# end
|
59
|
+
# end
|
60
|
+
# end
|
61
|
+
|
62
|
+
|
44
63
|
module Sass::Script::Functions
|
45
64
|
|
46
65
|
include Compass::ImgDelivery
|
@@ -69,7 +88,7 @@ module Sass::Script::Functions
|
|
69
88
|
svg_data_uri = img2b64(file)
|
70
89
|
svg_scss_content << scss_rule(basename, "image/svg+xml", svg_data_uri )
|
71
90
|
|
72
|
-
if !File.exists?(
|
91
|
+
if !File.exists?(outputfile)
|
73
92
|
# make png/ dir if not exists
|
74
93
|
mkdir_if_not_exists(outputfile)
|
75
94
|
# create png files with svg2png command
|
@@ -140,6 +159,8 @@ module Sass::Script::Functions
|
|
140
159
|
puts 'Ups! There was an error:'
|
141
160
|
puts e.inspect
|
142
161
|
end
|
162
|
+
|
163
|
+
Sass::Script::String.new("")
|
143
164
|
end
|
144
165
|
|
145
166
|
def img2b64(file)
|