The design language that makes your AI harness better at design.
JavaScript
bake: report the stylesheet path in posix form
Abdul Wahab6b0e68d89d8e
diff --git a/crates/live/src/bake.rs b/crates/live/src/bake.rsindex 3f1cd6818..094a2c72f 100644--- a/crates/live/src/bake.rs+++ b/crates/live/src/bake.rs@@ -533,12 +533,12 @@ mod tests {std::fs::write(dir.join("src/styles.css"), ".pricing-grid { display: grid }\n.pricing-card { padding: 1px }").unwrap();std::fs::write(dir.join("node_modules/x/x.css"), ".pricing-grid { color: red }").unwrap();let cwd = dir.to_string_lossy().into_owned();- let found = find_owning_stylesheet(&cwd, "div.pricing-grid").unwrap();+ let found = jsp::to_posix(&find_owning_stylesheet(&cwd, "div.pricing-grid").unwrap());assert!(found.ends_with("src/styles.css"), "{found}");assert_eq!(find_owning_stylesheet(&cwd, "div.nothing-here"), None);std::fs::remove_file(dir.join("src/styles.css")).unwrap();// One stylesheet in the app: it is the one.- let only = find_owning_stylesheet(&cwd, "div.nothing-here").unwrap();+ let only = jsp::to_posix(&find_owning_stylesheet(&cwd, "div.nothing-here").unwrap());assert!(only.ends_with("src/reset.css"), "{only}");let _ = std::fs::remove_dir_all(&dir);}diff --git a/crates/live/src/live_accept.rs b/crates/live/src/live_accept.rsindex c4b8431b7..62b595da6 100644--- a/crates/live/src/live_accept.rs+++ b/crates/live/src/live_accept.rs@@ -489,7 +489,7 @@ fn accept_cli(args: &[String], io: &mut Io) -> i32 {m.insert("css".into(),json!({- "file": css_file.as_deref().map(|f| jsp::relative("/", &cwd, f)),+ "file": css_file.as_deref().map(|f| jsp::to_posix(&jsp::relative("/", &cwd, f))),"rules": rules,"anchor": anchor,}),