MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / walkHtml

Function walkHtml

apps/docs/scripts/check-fragments.mjs:19–33  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

17const FRAGMENT_ALLOWLIST = new Set(["", "_top"]);
18
19function walkHtml(dir) {
20 const out = [];
21
22 for (const entry of readdirSync(dir)) {
23 const full = join(dir, entry);
24
25 if (statSync(full).isDirectory()) {
26 out.push(...walkHtml(full));
27 } else if (entry.endsWith(".html")) {
28 out.push(full);
29 }
30 }
31
32 return out;
33}
34
35/** Resolve a site-absolute path ("/api/acl/") to its built HTML file. */
36function resolveTarget(sitePath) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected