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

Function makeProject

packages/cli/src/utils/lintProject.test.ts:40–52  ·  view source on GitHub ↗
(indexHtml: string, subComps?: Record<string, string>)

Source from the content-addressed store, hash-verified

38let dirs: string[] = [];
39
40function makeProject(indexHtml: string, subComps?: Record<string, string>): string {
41 const dir = tmpProject("lint");
42 dirs.push(dir);
43 writeFileSync(join(dir, "index.html"), indexHtml);
44 if (subComps) {
45 const compsDir = join(dir, "compositions");
46 mkdirSync(compsDir, { recursive: true });
47 for (const [name, html] of Object.entries(subComps)) {
48 writeFileSync(join(compsDir, name), html);
49 }
50 }
51 return dir;
52}
53
54afterEach(() => {
55 for (const d of dirs) {

Callers 2

lintSubCompFunction · 0.70

Calls 2

entriesMethod · 0.80
tmpProjectFunction · 0.70

Tested by

no test coverage detected