refactor(preset): rework preset
test / test (push) Failing after 5m32s

This commit is contained in:
2026-10-29 20:35:53 +03:00
parent d9e8976e85
commit 2605c1bbc8
41 changed files with 475 additions and 473 deletions
+16
View File
@@ -0,0 +1,16 @@
import { branch, compile } from "../core/config";
import type { Config, PresetJson } from "../core/type";
import { Project } from "../project";
export default (preset: PresetJson): Project[] => {
const config: Config = compile(preset["default"] || {});
const projects: Project[] = [];
for (const [k, v] of Object.entries(preset)) {
if (k == "default") {
continue;
}
const projectConfig = branch(config, { ...v, name: k });
projects.push(new Project(projectConfig));
}
return projects;
};