Module | Sass::Files |
In: |
lib/sass/files.rb
|
This module contains various bits of functionality related to finding and caching Sass files.
Find the full filename of a Sass, SCSS, or CSS file to import. This follows Sass‘s import rules: if the filename given ends in `".sass"`, `".scss"`, or `".css"`, it will try to find that type of file; otherwise, it will try to find the corresponding Sass/SCSS file and fall back on CSS if it‘s not available.
Any Sass/SCSS filename returned will correspond to an actual file of the corresponding type on the filesystem. CSS filenames, however, may not; they‘re expected to be put through directly to the stylesheet as CSS `@import` statements.
@param filename [String] The filename to search for @param load_paths [Array<String>] The set of filesystem paths
to search for Sass/SCSS files.
@return [String] The filename of the imported file.
This is an absolute path if the file is a `".sass"` or `".scss"` file.
@raise [Sass::SyntaxError] if `filename` ends in `".sass"` or `".scss"`
and no corresponding Sass/SCSS file could be found.
Returns the {Sass::Tree} for the given file, reading it from the Sass cache if possible.
@param filename [String] The path to the Sass or SCSS file @param options [{Symbol => Object}] The options hash.
Only the {file:SASS_REFERENCE.md#cache-option `:cache_location`} option is used
@raise [Sass::SyntaxError] if there‘s an error in the document.
The caller has responsibility for setting backtrace information, if necessary