tasks/converter.rb in patternfly-sass-3.3.4 vs tasks/converter.rb in patternfly-sass-3.3.5
- old
+ new
@@ -138,10 +138,11 @@
def bower_contrib(src, dst, convert=true)
base = 'assets/stylesheets/patternfly/lib'
less = File.read(File.join('bower_components', src))
sass = convert ? less_to_sass(nil, less) : less
+ sass = remove_map_comments(sass)
FileUtils.mkdir_p(base) unless File.exist?(base)
File.open(File.join(base, dst), 'w') { |f| f.write(sass) }
end
def shared_mixins
@@ -223,9 +224,13 @@
def replace_escaping(less)
less = less.gsub(/~"([^"]+)"/, '#{\1}')
less.gsub!(/\$\{([\w\-]+)\}/, '#{$\1}')
less.gsub!(/\$\{([^}]+)\}/, '$\1')
less.gsub(/(\W)e\(%\("?([^"]*)"?\)\)/, '\1\2')
+ end
+
+ def remove_map_comments(less)
+ less.gsub(%r{\s*(#|@) sourceMappingURL=[^\s]+}, '')
end
def less_to_sass(file, input)
transforms = TRANSFORMATIONS.dup
case file