module Sprockets::CoffeeScriptProcessor
def self.cache_key
def self.cache_key @cache_key ||= "#{name}:#{Autoload::CoffeeScript::Source.version}:#{VERSION}".freeze end
def self.call(input)
def self.call(input) data = input[:data] js, map = input[:cache].fetch([self.cache_key, data]) do result = Autoload::CoffeeScript.compile(data, sourceMap: true, sourceFiles: [input[:source_path]]) [result['js'], SourceMapUtils.decode_json_source_map(result['v3SourceMap'])['mappings']] end map = SourceMapUtils.combine_source_maps(input[:metadata][:map], map) { data: js, map: map } end