17 lines
492 B
TypeScript
17 lines
492 B
TypeScript
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;
|
|
}
|
|
},
|
|
};
|
|
}
|
|
}
|