Use xtask for theme generation

This commit is contained in:
Piotr Osiewicz 2023-06-21 18:48:09 +02:00
parent 6e4439b4ca
commit 9aa7a50951
7 changed files with 122 additions and 17 deletions

11
crates/xtask/src/main.rs Normal file
View file

@ -0,0 +1,11 @@
mod cli;
use schemars::schema_for;
use theme::Theme;
fn main() {
let theme = schema_for!(Theme);
let output = serde_json::to_string_pretty(&theme).unwrap();
std::fs::create_dir("schemas").ok();
std::fs::write("schemas/theme.json", output).ok();
}