feat: add task module
test / test (push) Successful in 2m9s

This commit is contained in:
2026-11-10 15:29:25 +03:00
parent ab72b3c948
commit bbb1d062f1
33 changed files with 241 additions and 219 deletions
+4 -6
View File
@@ -1,16 +1,14 @@
import { branch, compile } from "../core/config";
import type { Config, PresetJson } from "../core/type";
import { Project } from "../project";
export default (preset: PresetJson): Project[] => {
export default (preset: PresetJson): Config[] => {
const config: Config = compile(preset["default"] || {});
const projects: Project[] = [];
const result: Config[] = [];
for (const [k, v] of Object.entries(preset)) {
if (k == "default") {
continue;
}
const projectConfig = branch(config, { ...v, name: k });
projects.push(new Project(projectConfig));
result.push(branch(config, { ...v, name: k }));
}
return projects;
return result;
};