blob: 8c354d0db9e5f747e9c5e260335a7c2ce5053d71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
use std::env;
use std::fs;
use std::path::Path;
fn main() {
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env var missing");
let dest_path = Path::new(&out_dir).join("style.css");
fs::write(
&dest_path,
grass::from_string(
include_str!("data/style.scss").to_string(),
&grass::Options::default(),
)
.expect("scss failed to compile"),
)
.expect("failed to write css file");
println!("cargo:rerun-if-changed=data/style.scss");
}
|