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

This commit is contained in:
2026-11-07 00:18:03 +03:00
parent 68bb39f09a
commit 441b800b18
33 changed files with 241 additions and 219 deletions
+16
View File
@@ -0,0 +1,16 @@
import { Haxe } from "../../impl/haxe";
import { TaskCompilerImpl, type TaskBundle } from "../core";
export class ProtoTaskCompiler extends TaskCompilerImpl {
compile(): TaskBundle {
return {
"protohx:generate": async () => {
const haxe = new Haxe(this.config.haxe);
const result = await haxe.haxelib(["run", "protohx", "generate", "protohx.json"]);
if (result.stdout.indexOf("FAIL") > -1) {
throw result.stdout;
}
},
};
}
}