class Sass::Compiler

def compile(path,

Other tags:
    See: https://sass-lang.com/documentation/js-api/functions/compile/ -

Raises:
  • (ArgumentError, CompileError, IOError) -

Returns:
  • (CompileResult) -

Parameters:
  • verbose (Boolean) -- By default, Dart Sass will print only five instances of the same deprecation warning per
  • silence_deprecations (Array) -- A set of active deprecations to ignore.
  • quiet_deps (Boolean) -- If this option is set to +true+, Sass won’t print warnings that are caused by
  • logger (Object) -- An object to use to handle warnings and/or debug messages from Sass.
  • future_deprecations (Array) -- A set of future deprecations to opt into early.
  • fatal_deprecations (Array) -- A set of deprecations to treat as fatal.
  • alert_color (Boolean) -- If this is +true+, the compiler will use ANSI color escape codes in its error and
  • alert_ascii (Boolean) -- If this is +true+, the compiler will exclusively use ASCII characters in its error
  • importers (Array) -- Custom importers that control how Sass resolves loads from rules like
  • functions (Hash) -- Additional built-in Sass functions that are available in all stylesheets.
  • style (Symbol) -- The OutputStyle of the compiled CSS.
  • source_map_include_sources (Boolean) -- Whether Sass should include the sources in the generated source map.
  • source_map (Boolean) -- Whether or not Sass should generate a source map.
  • charset (Boolean) -- By default, if the CSS document contains non-ASCII characters, Sass adds a +@charset+
  • load_paths (Array) -- Paths in which to look for stylesheets loaded by rules like
  • path (String) --
  • def compile(path,
                load_paths: [],
                charset: true,
                source_map: false,
                source_map_include_sources: false,
                style: :expanded,
                functions: {},
                importers: [],
                alert_ascii: false,
                alert_color: nil,
                fatal_deprecations: [],
                future_deprecations: [],
                logger: nil,
                quiet_deps: false,
                silence_deprecations: [],
                verbose: false)
      raise ArgumentError, 'path must be set' if path.nil?
      Host.new(@channel).compile_request(
        path:,
        source: nil,
        importer: nil,
        load_paths:,
        syntax: nil,
        url: nil,
        charset:,
        source_map:,
        source_map_include_sources:,
        style:,
        functions:,
        importers:,
        alert_color:,
        alert_ascii:,
        fatal_deprecations:,
        future_deprecations:,
        logger:,
        quiet_deps:,
        silence_deprecations:,
        verbose:
      )
    end