Files
gulp-haxetool/src/project/impl/runner/flash.ts
T
shmyga 6fd8988251
test / test (push) Successful in 1m10s
feat: add task module
2026-11-10 15:30:34 +03:00

27 lines
771 B
TypeScript

import path from "path";
import { type Config, Platform } from "../../../core/type";
import { FlashPlayer } from "../../../impl/flashplayer";
import { Runner } from "../../core/runner";
export class FlashRunner extends Runner {
public player: FlashPlayer;
constructor(config: Config, debug?: boolean, player: typeof FlashPlayer = FlashPlayer) {
super(config, Platform.FLASH, debug);
this.player = new player(debug);
}
setup() {
return this.player.prepare();
}
call() {
const target = this.targetPath;
const filename = path.resolve(target, this.config.meta.filename + ".swf");
const result = this.player.run(filename, { cwd: target, verbosity: 0 });
return this.log(result);
}
}
Runner.register(Platform.FLASH, FlashRunner);