mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-30 04:04:09 +01:00
Implement compile-time validation that all CSS class names defined in identifiers.rs have corresponding styles in style.css. Build Script Integration: - Add build.rs with lightningcss for CSS parsing - Parse style.css and extract all class selectors - Iterate over CssClasses and TypeClasses using struct_iterable - Fail build if any defined class lacks CSS rules Runtime Test (backup validation): - Add `test_all_css_classes_are_styled` in identifiers.rs - Uses regex to extract class names from CSS file - Verifies both CSS and TYPE_CLASSES are fully styled - Allows dynamic prefixes like "depth-" that are generated at runtime Struct Changes: - Add `#[derive(Iterable)]` to CssClasses and TypeClasses - Add `#[allow(dead_code)]` to IDS and HtmlIds (used by main, not build) Cleanup: - Remove unused CSS classes: `map_entries`, `too_deep` - Remove corresponding entries from identifiers.rs New Dependencies: - lightningcss = "1.0.0-alpha.68" (build-dependency) - struct_iterable = "0.1" (dependency and build-dependency) - serde with derive (build-dependency for struct_iterable) This ensures CSS/Rust synchronization is maintained and catches missing styles before runtime.
33 lines
658 B
TOML
33 lines
658 B
TOML
[package]
|
|
name = "schemars-docgen"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "Generate HTML documentation from schemars::Schema objects"
|
|
license-file = "LICENSE.md"
|
|
|
|
[lib]
|
|
name = "schemars_docgen"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "schemars-docgen"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
schemars = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
tera = "1"
|
|
pulldown-cmark = "0.13"
|
|
clap = { version = "4", features = ["derive"] }
|
|
thiserror = "2"
|
|
struct_iterable = "0.1"
|
|
|
|
[build-dependencies]
|
|
lightningcss = "1.0.0-alpha.68"
|
|
struct_iterable = "0.1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
[dev-dependencies]
|
|
regex = "1"
|