Sha256: a01a905d31aaf041894e362001b305e81ce1fe8432a3155ac37b8fbba9a25502

Contents?: true

Size: 604 Bytes

Versions: 2

Compression:

Stored size: 604 Bytes

Contents

require 'compass'

class Compass::Compiler
  alias old_initialize initialize

  def initialize(working_path, from, to, options)
    old_initialize(working_path, from, to, options)
    self.sass_options[:importer] = Sass::ImportOnce::Importer.new(from)
  end
end

module Compass::Configuration::Adapters
  alias old_sass_load_paths sass_load_paths

  def sass_load_paths
    load_paths = old_sass_load_paths

    load_paths.map! do |p|
      next p if p.respond_to?(:find_relative) && !p.is_a?(Sass::Importers::Filesystem)
      Sass::ImportOnce::Importer.new(p.to_s)
    end
    
    load_paths
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
compass-import_once-0.1.3 lib/compass/import_once/monkey_patches.rb
compass-import_once-0.1.2 lib/compass/import_once/monkey_patches.rb