MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / collectHtmlFiles

Function collectHtmlFiles

packages/lint/src/project.ts:198–206  ·  view source on GitHub ↗
(dir: string, rel: string)

Source from the content-addressed store, hash-verified

196 const compositionsDir = resolve(projectDir, "compositions");
197 if (existsSync(compositionsDir)) {
198 const collectHtmlFiles = (dir: string, rel: string): string[] => {
199 const out: string[] = [];
200 for (const entry of readdirSync(dir, { withFileTypes: true })) {
201 const relPath = rel ? `${rel}/${entry.name}` : entry.name;
202 if (entry.isDirectory()) out.push(...collectHtmlFiles(join(dir, entry.name), relPath));
203 else if (entry.isFile() && entry.name.endsWith(".html")) out.push(relPath);
204 }
205 return out;
206 };
207 const files = collectHtmlFiles(compositionsDir, "").sort();
208 for (const file of files) {
209 const filePath = join(compositionsDir, file);

Callers 1

lintProjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected