@@ -0,0 +1,16 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user