MCPcopy Create free account
hub / github.com/FastLED/FastLED / copy_dist_to_output

Function copy_dist_to_output

ci/esbuild_frontend.py:208–226  ·  view source on GitHub ↗
(output_dir: Path)

Source from the content-addressed store, hash-verified

206
207
208def copy_dist_to_output(output_dir: Path) -> None:
209 dist_dir = build_dist()
210 hash_marker = output_dir / ".frontend_hash"
211 current_hash = _compute_dir_hash(dist_dir)
212 if (
213 hash_marker.exists()
214 and hash_marker.read_text(encoding="utf-8").strip() == current_hash
215 ):
216 print("[WASM] Frontend assets unchanged, skipping copy")
217 return
218
219 for item in dist_dir.iterdir():
220 destination = output_dir / item.name
221 if item.is_dir():
222 _copy_tree(item, destination)
223 else:
224 _copy_file(item, destination)
225
226 hash_marker.write_text(current_hash, encoding="utf-8")

Callers 1

copy_templatesFunction · 0.90

Calls 5

build_distFunction · 0.85
_compute_dir_hashFunction · 0.85
_copy_treeFunction · 0.85
_copy_fileFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected