Files
hyperframes/packages/core/src/projectRule.ts
T
Miguel Ángel 32f562bbd0 feat(core): a folder with index.html is one a step can work on, apart from finding projects (#7734)
* 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
2026-11-14 14:02:28 +00:00

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");
}