mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-23 11:29:54 +00:00
* feat(core): a folder with index.html is one a step can work on, apart from finding projects isHyperframesProject needs index.html and a marker file, which is right for finding projects on a computer (a website's folder must not be listed) but not for what a step works on. isCompositionFolder says that: any folder whose index.html is the composition. * build(core): raise core's unpacked size budget for the step folder rule
12 lines
547 B
TypeScript
12 lines
547 B
TypeScript
/** Files that `hyperframes init` or another HyperFrames tool writes at a project's root, next to its `index.html`. */
|
|
export const PROJECT_MARKER_FILES = ["hyperframes.json", "meta.json", "project.json"] as const;
|
|
|
|
export function isHyperframesProject(fileNames: Iterable<string>): boolean {
|
|
const names = new Set(fileNames);
|
|
return names.has("index.html") && PROJECT_MARKER_FILES.some((name) => names.has(name));
|
|
}
|
|
|
|
export function isCompositionFolder(fileNames: Iterable<string>): boolean {
|
|
return new Set(fileNames).has("index.html");
|
|
}
|