From ede8a26e590714ae5f051cdca539ca604e19bd8f Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 22 Mar 2026 21:54:18 +0300 Subject: [PATCH] pinakes-ui: get rid of the build wrapper; let Dioxus compile its own stylesheets Signed-off-by: NotAShelf Change-Id: I8e83a7d9e592b0770b22c5832da6a5586a6a6964 --- Cargo.lock | Bin 242542 -> 241244 bytes crates/pinakes-ui/Cargo.toml | 3 --- crates/pinakes-ui/build.rs | 33 -------------------------------- crates/pinakes-ui/src/styles.rs | 5 ++--- 4 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 crates/pinakes-ui/build.rs diff --git a/Cargo.lock b/Cargo.lock index 165cf69670bd0c8f822800ce4fd2358c58b68f86..495a23a0bf577b1201657ba6aebd5ecc095ba980 100644 GIT binary patch delta 56 zcmV-80LTCC<__H44zLyjvmXR5O0x`4&)c^KEdlojljBJhmryhT8Mj+C0Z2u+h delta 602 zcmZ{hJ!@1!6o#3*F_9223maA1jFnQNHiCI#6w`&hN!hH5l&n zuJ=~yHCwYU_xlQ%O3XM6nxa%zdJ7hn(~cW}fKv0wP2vcKB9)O+!Nh$MG1S_my($nTt2y__^Nw@yKK9lcm7MB(tji9O?;&6L+@Hn?0 z6w51rPvYo55IndjLNbYR&M_)xB~#KF5x6vsSQgyWE4LUMe*!fI!5F3J5@1R-aTjNY zf4m*PYISBBh+)lMFV>sS%RHEnwQ>70`88J`%y#BrYg+5oy3ekRR~UiyqN?iNTi@4_ z$rwOU5YkC6d@|lmVNh`?n)Wn{P55BAXgF91DquvOJTeho^7*qO-Fza*0+IFc)8+C0 T9{Ki?R4+Ep$av$dxN!Izud%sC diff --git a/crates/pinakes-ui/Cargo.toml b/crates/pinakes-ui/Cargo.toml index 43bf1c6..f77b273 100644 --- a/crates/pinakes-ui/Cargo.toml +++ b/crates/pinakes-ui/Cargo.toml @@ -37,6 +37,3 @@ default = ["web"] web = ["dioxus/web"] desktop = ["dioxus/desktop"] mobile = ["dioxus/mobile"] - -[build-dependencies] -grass = "0.13" diff --git a/crates/pinakes-ui/build.rs b/crates/pinakes-ui/build.rs deleted file mode 100644 index 22fa64d..0000000 --- a/crates/pinakes-ui/build.rs +++ /dev/null @@ -1,33 +0,0 @@ -#![expect( - clippy::expect_used, - reason = "build scripts conventionally panic on failure; there is no caller \ - to propagate errors to" -)] - -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"); - } -} diff --git a/crates/pinakes-ui/src/styles.rs b/crates/pinakes-ui/src/styles.rs index 197ae0b..9f8ad3e 100644 --- a/crates/pinakes-ui/src/styles.rs +++ b/crates/pinakes-ui/src/styles.rs @@ -1,8 +1,7 @@ //! Styles module for Pinakes UI //! -//! Exports the CSS asset for use with Dioxus. -//! SCSS files are compiled to CSS via build.rs. +//! Exports the SCSS asset for use with Dioxus. use dioxus::prelude::*; -pub static STYLES: Asset = asset!("/assets/css/main.css"); +pub static STYLES: Asset = asset!("/assets/styles/main.scss");