CLI Argument Builder for Sass compilation
Builds CLI arguments for Dart Sass from Config objects.
Constants
ALLOWED_SOURCE_MAP_URLS = {"relative", "absolute"}
Allowed source map URL types
ALLOWED_STYLES = {"expanded", "compressed"}
Allowed output styles for Dart Sass
EXECUTABLE_PERMISSION_MASK = 73
Executable permission bits (rwx for user/group/other)
FRONT_MATTER_SPLIT_PARTS = 3
YAML front matter delimiter count for split operation
MAX_INPUT_FILE_SIZE = (10 * 1024) * 1024
Maximum input file size (10MB) to prevent memory exhaustion
MAX_STDIN_SIZE = (1 * 1024) * 1024
Maximum stdin source size (1MB) to prevent memory exhaustion
Class methods
compile(source :
String, style :
String = "expanded", load_paths :
Array(
String) |
Nil = nil, source_map :
Bool = false, source_map_embed :
Bool = false, source_map_urls :
String = "relative", embed_sources :
Bool = false, charset :
Bool = true, error_css :
Bool = true, quiet :
Bool = false, quiet_deps :
Bool = false, verbose :
Bool = false, source_path :
String |
Nil = nil, include_path :
Array(
String) |
String |
Nil = nil, is_indented_syntax_src :
Bool = false) :
String Backward compatibility: original sass.cr-style API
Sourcecompile_file(path :
String, style :
String = "expanded", load_paths :
Array(
String) |
Nil = nil, source_map :
Bool = false, source_map_embed :
Bool = false, source_map_urls :
String = "relative", embed_sources :
Bool = false, charset :
Bool = true, error_css :
Bool = true, quiet :
Bool = false, quiet_deps :
Bool = false, verbose :
Bool = false, include_path :
Array(
String) |
String |
Nil = nil, is_indented_syntax_src :
Bool = false) :
String Backward compatibility: original sass.cr-style API
Sourcecompiler_instance_to_config(compiler_style :
String, compiler_source_map :
Bool, compiler_source_map_embed :
Bool, compiler_source_map_urls :
String, compiler_embed_sources :
Bool, compiler_charset :
Bool, compiler_error_css :
Bool, compiler_quiet :
Bool, compiler_quiet_deps :
Bool, compiler_verbose :
Bool, compiler_load_paths :
Array(
String), compiler_include_path :
Array(
String) |
String |
Nil, is_indented_syntax_src :
Bool = false) :
Config Convert Compiler instance variables to Config object
Sourcedefault_config
Get the default configuration
Sourcedefault_config=(config : Config)
Set the default configuration
Sourcelegacy_params_to_config(style :
String = "expanded", load_paths :
Array(
String) |
Nil = nil, source_map :
Bool = false, source_map_embed :
Bool = false, source_map_urls :
String = "relative", embed_sources :
Bool = false, charset :
Bool = true, error_css :
Bool = true, quiet :
Bool = false, quiet_deps :
Bool = false, verbose :
Bool = false, include_path :
Array(
String) |
String |
Nil = nil, is_indented_syntax_src :
Bool = false) :
Config Convert legacy API parameters to Config object
Sourcemin_version
The minimum required version of Dart Sass.
Sourceupdate_config(config :
Config, style :
String |
Nil = nil, load_paths :
Array(
String) |
Nil = nil, source_map :
Bool |
Nil = nil, source_map_embed :
Bool |
Nil = nil, source_map_urls :
String |
Nil = nil, embed_sources :
Bool |
Nil = nil, charset :
Bool |
Nil = nil, error_css :
Bool |
Nil = nil, quiet :
Bool |
Nil = nil, quiet_deps :
Bool |
Nil = nil, verbose :
Bool |
Nil = nil, include_path :
Array(
String) |
String |
Nil = nil, is_indented_syntax_src :
Bool |
Nil = nil, min_version :
String |
Nil = nil, bin_path :
String |
Nil = nil, fatal_deprecation :
String |
Nil = nil, silence_deprecation :
Array(
String) |
Nil = nil, future_deprecation :
String |
Nil = nil, timeout :
Int64 |
Nil = nil) :
Config Update specific fields in a config while preserving others
SourceValidate and resolve a file path to prevent path traversal
SourceValidate a binary path for command execution
SourceValidate a file path for security concerns
Source