(collection: &str, root: &Path, dir: &Path, out: &mut Vec<DocOut>)
| 220 | |
| 221 | fn build_and_sync_demo(root: &Path, project_name: &str, public_name: &str) -> io::Result<()> { |
| 222 | let project_root = root.join("demos").join(project_name); |
| 223 | emit_rerun_for_tree(&project_root)?; |
| 224 | |
| 225 | let output_dir = project_root.join(".output").join("web"); |
| 226 | let public_dir = root |
| 227 | .join("perro_website") |
| 228 | .join("public") |
| 229 | .join("demos") |
| 230 | .join(public_name); |
| 231 | if needs_demo_rebuild(&project_root, &output_dir, &public_dir)? { |
| 232 | compile_project_bundle( |
| 233 | &project_root, |
| 234 | ProjectBuildOptions::new(false, false) |
| 235 | .with_target(ProjectBuildTarget::Web) |
| 236 | .with_web_output_dir(WebOutputDir::Build), |
| 237 | ) |
| 238 | .map_err(|err| io::Error::other(format!("{project_name} web build failed: {err}")))?; |
| 239 | } |
no test coverage detected