refactor(project): refactor project modules
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import gulp from "gulp";
|
||||
import path from "path";
|
||||
import { Config } from "../../../core/config";
|
||||
import { Platform } from "../../../core/type";
|
||||
import run from "../../../run";
|
||||
import { Runner } from "../../core/runner";
|
||||
|
||||
export class LinuxRunner extends Runner {
|
||||
constructor(config: Config, debug: boolean) {
|
||||
super(config, Platform.LINUX, debug);
|
||||
}
|
||||
|
||||
call() {
|
||||
const target = this.targetPath;
|
||||
const filename = path.resolve(target, this.config.meta.filename!);
|
||||
const result = gulp.src(filename).pipe(run("./<%=file.basename%>", { cwd: target, verbosity: 0 }));
|
||||
return this.log(result);
|
||||
}
|
||||
}
|
||||
|
||||
Runner.register(Platform.LINUX, LinuxRunner);
|
||||
|
||||
export class CPPRunner extends LinuxRunner {
|
||||
constructor(config: Config, debug: boolean) {
|
||||
super(config, debug);
|
||||
this.platform = Platform.CPP;
|
||||
}
|
||||
}
|
||||
|
||||
Runner.register(Platform.CPP, CPPRunner);
|
||||
Reference in New Issue
Block a user