(collection: &str, path: &Path, slug: String, out: &mut Vec<DocOut>)
| 243 | } |
| 244 | Ok(()) |
| 245 | } |
| 246 | |
| 247 | fn emit_rerun_for_tree(dir: &Path) -> io::Result<()> { |
| 248 | if !dir.exists() { |
| 249 | return Ok(()); |
| 250 | } |
| 251 | for entry in fs::read_dir(dir)? { |
| 252 | let path = entry?.path(); |
| 253 | let name = path |
| 254 | .file_name() |
| 255 | .and_then(|name| name.to_str()) |
| 256 | .unwrap_or(""); |
| 257 | if name == "target" || name == ".output" || name == ".perro" { |
| 258 | continue; |
| 259 | } |
| 260 | if path.is_dir() { |
| 261 | emit_rerun_for_tree(&path)?; |
| 262 | } else { |
| 263 | println!("cargo:rerun-if-changed={}", path.display()); |
| 264 | } |
| 265 | } |
| 266 | Ok(()) |
| 267 | } |
| 268 | |
| 269 | fn bundle_complete(dir: &Path) -> bool { |
| 270 | ["index.html", "boot.js", "app.js", "app_bg.wasm"] |
| 271 | .iter() |
| 272 | .all(|required| dir.join(required).exists()) |
| 273 | } |
| 274 | |
| 275 | fn needs_demo_rebuild( |
| 276 | project_root: &Path, |
no test coverage detected