Sha256: 717b9a562cca3584014ac2a2c71791a7104d974de7a97b7881845d3485c67dee
Contents?: true
Size: 468 Bytes
Versions: 5
Compression:
Stored size: 468 Bytes
Contents
class AssetFormat::Js < AssetFormat CONTENT_TYPE = 'text/javascript' IMPORT = /[\/\*]{2}\s*@import[ "'\(]+([^\s"'\);]+)[\s"'\);]*(\*\/)?/ IMPORT_COFFEE = /# *@import[ "'\(]+([^\s"'\);]+)[ "'\)]*/ EXTEND_FORMATS = [:coffee] def minify text ::Uglifier.compile text, copyright: false end def coffee text text = text.gsub(IMPORT_COFFEE){ |s| "\n### @import #{IMPORT_COFFEE.match(s)[1]}\n###\n" } ::CoffeeScript.compile text end end
Version data entries
5 entries across 5 versions & 1 rubygems