feat(project): add preset
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user