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

Function safeReadFile

packages/core/src/compiler/htmlBundler.ts:81–88  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

79}
80
81function safeReadFile(filePath: string): string | null {
82 if (!existsSync(filePath)) return null;
83 try {
84 return readFileSync(filePath, "utf-8");
85 } catch {
86 return null;
87 }
88}
89
90const CSS_IMPORT_RE =
91 /@import\s+(?:url\(\s*(["']?)([^)"']+)\1\s*\)|(["'])([^"']+)\3)\s*([^;]*);\s*/g;

Callers 3

inlineCssFileFunction · 0.85
hoistExternalScriptFunction · 0.85
bundleToSingleHtmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected