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

Function listHtmlFiles

packages/cli/src/commands/init.ts:255–274  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

253}
254
255function listHtmlFiles(dir: string): string[] {
256 const files: string[] = [];
257 const ignoredDirs = new Set([".git", "dist", "node_modules"]);
258
259 function walk(currentDir: string): void {
260 for (const entry of readdirSync(currentDir, { withFileTypes: true })) {
261 const entryPath = join(currentDir, entry.name);
262 if (entry.isDirectory()) {
263 if (!ignoredDirs.has(entry.name)) walk(entryPath);
264 continue;
265 }
266 if (entry.isFile() && entry.name.endsWith(".html")) {
267 files.push(entryPath);
268 }
269 }
270 }
271
272 walk(dir);
273 return files;
274}
275
276export function injectTailwindBrowserScript(html: string): string {
277 if (html.includes(TAILWIND_BROWSER_SRC)) return html;

Callers 2

writeTailwindSupportFunction · 0.85
applyResolutionPresetFunction · 0.85

Calls 1

walkFunction · 0.70

Tested by

no test coverage detected