sass-embedded 0.7.1

A Rust library that will communicate with Embedded Dart Sass using the Embedded Sass protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use sass_embedded::{Sass, StringOptionsBuilder};

fn exe_path() -> std::path::PathBuf {
  std::path::PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR")))
    .join("ext/sass/sass-embedded")
    .join("dart-sass-embedded")
}

fn main() {
  let mut sass = Sass::new(exe_path()).unwrap();
  let res = sass
    .compile_string(
      "a {b: c}",
      StringOptionsBuilder::default().source_map(true).build(),
    )
    .unwrap();
  dbg!(res);
}