Files
gulp-haxetool/src/preset/compiler.ts
T
shmyga 9dda423e06
test / test (push) Failing after 6m7s
refactor(preset): rework preset
2026-10-29 18:31:53 +03:00

17 lines
541 B
TypeScript

import { Config } from "../core/config";
import { Project } from "../project";
import type { PresetBundle } from "./type";
export default (preset: PresetBundle): Project[] => {
const config = new Config(preset["default"]?.config || {});
const projects: Project[] = [];
for (const [k, v] of Object.entries(preset)) {
if (k == "default") {
continue;
}
const projectConfig = config.branch({ ...v.config, name: k });
projects.push(new Project(v.buildSystem!, v.platforms!, projectConfig));
}
return projects;
};