front-end-blender 0.8 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/blend +11 -16
- metadata +1 -1
data/bin/blend
CHANGED
@@ -17,7 +17,7 @@ require 'find'
|
|
17
17
|
|
18
18
|
# TODO Move class to lib so other tools could potentially reuse it
|
19
19
|
class Blender
|
20
|
-
VERSION = '0.8'
|
20
|
+
VERSION = '0.8.1'
|
21
21
|
|
22
22
|
attr_reader :options
|
23
23
|
|
@@ -108,22 +108,17 @@ class Blender
|
|
108
108
|
blend_files = Hash.new
|
109
109
|
|
110
110
|
Find.find(Dir.getwd) do |f|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
blend_files[key] = [f]
|
117
|
-
end
|
111
|
+
f.gsub!(Dir.getwd.to_s+"/", "")
|
112
|
+
if File.extname(f) == ".css"
|
113
|
+
file = f.split(".css")
|
114
|
+
min_file = file[0] + "-min.css"
|
115
|
+
blend_files[f] = [min_file]
|
118
116
|
end
|
119
117
|
|
120
|
-
if f.
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
else
|
125
|
-
blend_files[key] = [f]
|
126
|
-
end
|
118
|
+
if File.extname(f) == ".js"
|
119
|
+
file = f.split(".js")
|
120
|
+
min_file = file[0] + "-min.js"
|
121
|
+
blend_files[f] = [min_file]
|
127
122
|
end
|
128
123
|
|
129
124
|
Find.prune if File.basename(f).index('.') == 0
|
@@ -152,7 +147,7 @@ class Blender
|
|
152
147
|
|
153
148
|
output = io.read
|
154
149
|
|
155
|
-
if output_name.
|
150
|
+
if File.extname(output_name) == ".css"
|
156
151
|
output.gsub! ' and(', ' and (' # Workaround for YUI Compressor Bug #1938329
|
157
152
|
output.gsub! '/**/;}', '/**/}' # Workaround for YUI Compressor Bug #1961175
|
158
153
|
|