28 lines
722 B
TypeScript
28 lines
722 B
TypeScript
import path from "path";
|
|
import { Config } from "../../../core/config";
|
|
import { Platform } from "../../../core/type";
|
|
import { Neko } from "../../../impl/neko";
|
|
import { Runner } from "../../core/runner";
|
|
|
|
export class NekoRunner extends Runner {
|
|
public neko: Neko;
|
|
|
|
constructor(config: Config, debug: boolean) {
|
|
super(config, Platform.NEKO, debug);
|
|
this.neko = new Neko();
|
|
}
|
|
|
|
prepare() {
|
|
return this.neko.prepare();
|
|
}
|
|
|
|
call() {
|
|
const target = this.targetPath;
|
|
const filename = path.resolve(target, this.config.meta.filename + ".n");
|
|
const result = this.neko.run(filename, { cwd: target, verbosity: 0 });
|
|
return this.log(result);
|
|
}
|
|
}
|
|
|
|
Runner.register(Platform.NEKO, NekoRunner);
|