1pub mod bench;
9pub mod book_page;
10pub mod recipe_area;
11pub mod cargo_toml;
12pub mod content;
13pub mod design;
14pub mod exports;
15pub mod manifest;
16pub mod media;
17pub mod serve;
18pub mod yres;
19pub mod yui;
20pub mod yui_component;
21pub mod yui_grid;
22pub mod yui_vm;
23
24pub(crate) fn write_if_changed(path: &std::path::Path, code: &str) -> Result<(), String> {
28 if std::fs::read_to_string(path).ok().as_deref() == Some(code) {
29 return Ok(());
30 }
31 if let Some(dir) = path.parent() {
32 std::fs::create_dir_all(dir).map_err(|e| format!("{}: {e}", dir.display()))?;
33 }
34 std::fs::write(path, code).map_err(|e| format!("{}: {e}", path.display()))
35}