pinakes/crates/pinakes-ui/build.rs
NotAShelf 3ccddce7fd
treewide: fix various UI bugs; optimize crypto dependencies & format
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If8fe8b38c1d9c4fecd40ff71f88d2ae06a6a6964
2026-03-06 18:29:33 +03:00

27 lines
762 B
Rust

use std::{fs, path::Path};
fn main() {
// Compile SCSS to CSS
let scss_dir = Path::new("assets/styles");
let css_dir = Path::new("assets/css");
// Create CSS output directory if it doesn't exist
fs::create_dir_all(css_dir).expect("Failed to create CSS directory");
// Compile main.scss
let scss_input = scss_dir.join("main.scss");
let css_output = css_dir.join("main.css");
if scss_input.exists() {
let css = grass::from_path(
&scss_input,
&grass::Options::default().style(grass::OutputStyle::Compressed),
)
.expect("Failed to compile SCSS");
fs::write(&css_output, css).expect("Failed to write CSS");
// Tell cargo to rerun if SCSS files change
println!("cargo:rerun-if-changed=assets/styles");
}
}