void-werefox-cafe/void-fe/build.rs

20 lines
655 B
Rust
Raw Normal View History

fn main() {
let mut tailwind = std::process::Command::new("npx");
tailwind.args(
"tailwindcss -i src/index.css -c tailwind.config.js -o ../public/styles/tailwind.min.css --minify"
.split(" "),
);
tailwind.env("NODE_ENV", "production");
match tailwind.spawn() {
Ok(_) => (),
Err(_) => {
print!("Didn't find npx in the path, can't compile CSS. Is Node installed?");
()
}
}
}
// let mut content = Vec::new();
// for f in std::fs::read_dir("../data/poems").unwrap() {
// content.push(std::fs::read_to_string(f.unwrap().path()).unwrap());
// }
// }