Files
gulp-haxetool/src/preset/compiler.ts
T
shmyga bbb1d062f1
test / test (push) Successful in 2m9s
feat: add task module
2026-11-10 15:29:25 +03:00

15 lines
421 B
TypeScript

import { branch, compile } from "../core/config";
import type { Config, PresetJson } from "../core/type";
export default (preset: PresetJson): Config[] => {
const config: Config = compile(preset["default"] || {});
const result: Config[] = [];
for (const [k, v] of Object.entries(preset)) {
if (k == "default") {
continue;
}
result.push(branch(config, { ...v, name: k }));
}
return result;
};