module Sprockets::Transformers
def compute_transformers!
def compute_transformers! registered_transformers = self.config[:registered_transformers] transformers = Hash.new { {} } inverted_transformers = Hash.new { Set.new } registered_transformers.keys.flat_map do |key| dfs_paths([key]) { |k| registered_transformers[k].keys } end.each do |types| src, dst = types.first, types.last processor = compose_transformers(registered_transformers, types) transformers[src] = {} unless transformers.key?(src) transformers[src][dst] = processor inverted_transformers[dst] = Set.new unless inverted_transformers.key?(dst) inverted_transformers[dst] << src end self.config = hash_reassoc(config, :transformers) { transformers } self.config = hash_reassoc(config, :inverted_transformers) { inverted_transformers } end