Sha256: 18ada3cc7d6c436ddd445f70cf188a3f473f3a048afa82cd003de44b3dacae9e
Contents?: true
Size: 614 Bytes
Versions: 13
Compression:
Stored size: 614 Bytes
Contents
# CSSO complains when using node as an execJS runtime, but we currently have # to due to a bug in therubyracer (or maybe execJS?) require 'execjs' module Csso class JsLib def initialize spec = Gem::Specification.find_by_name("csso-rails") path = spec.gem_dir lib = File.read(File.expand_path(path + "/" + CSSO_JS_LIB, File.dirname(__FILE__))) unless @csso = ExecJS.runtime.compile(lib) raise 'cannot compile or what?' end end def compress css, structural_optimization=true @csso.call("do_compression", css, !structural_optimization) end end end
Version data entries
13 entries across 13 versions & 1 rubygems