class Sass::Importers::DeprecatedPath

directory from the list of automatic sass load paths.
import a file. It is used to deprecate the current working
This importer emits a deprecation warning the first time it is used to

def deprecation_warning

Returns:
  • (String) - The deprecation warning that will be printed the first
def deprecation_warning
  path = @specified_root == "." ? "the current working directory" : @specified_root
  <<WARNING
ATION WARNING: Importing from #{path} will not be
tic in future versions of Sass.  To avoid future errors, you can add it
r environment explicitly by setting `SASS_PATH=#{@specified_root}`, by using the -I command
ption, or by changing your Sass configuration options.
G
end

def directories_to_watch

Other tags:
    See: Base#directories_to_watch -
def directories_to_watch
  # The current working directory was not watched in Sass 3.2,
  # so we continue not to watch it while it's deprecated.
  []
end

def find(*args)

Other tags:
    See: Sass::Importers::Base#find -
def find(*args)
  found = super
  if found && !@warning_given
    @warning_given = true
    Sass::Util.sass_warn deprecation_warning
  end
  found
end

def initialize(root)

Parameters:
  • root (String) -- The absolute, expanded path to the folder that is deprecated.
def initialize(root)
  @specified_root = root
  @warning_given = false
  super
end

def to_s

Other tags:
    See: Sass::Importers::Base#to_s -
def to_s
  "#{@root} (DEPRECATED)"
end