Function rsass::compile_scss_path
source · pub fn compile_scss_path(path: &Path, format: Format) -> Result<Vec<u8>, Error>
Expand description
Parse a file of scss data and write css in the given style.
Any @import
directives will be handled relative to the directory
part of file
.
§Example
use rsass::{compile_scss_path, output::{Format, Style}};
assert_eq!(
compile_scss_path(
"tests/misc/14_imports/a.scss".as_ref(),
Format { style: Style::Compressed, precision: 5 },
).unwrap(),
b"div span{moo:goo}\n"
)
Attention: Previously, this function was named compile_scss_file()
.