MCPcopy Create free account
hub / github.com/PerroEngine/Perro / push_doc

Function push_doc

perro_website/build.rs:245–273  ·  view source on GitHub ↗
(collection: &str, path: &Path, slug: String, out: &mut Vec<DocOut>)

Source from the content-addressed store, hash-verified

243 }
244 Ok(())
245}
246
247fn 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
269fn 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
275fn needs_demo_rebuild(
276 project_root: &Path,

Callers 2

collect_markdownFunction · 0.85
collect_demo_docFunction · 0.85

Calls 11

rewrite_markdown_linksFunction · 0.85
first_titleFunction · 0.85
title_from_slugFunction · 0.85
route_pathFunction · 0.85
first_paraFunction · 0.85
headingsFunction · 0.85
doc_keywordsFunction · 0.85
search_textFunction · 0.85
markdown_htmlFunction · 0.70
nextMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected