feat(project): add preset
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import gulp from "gulp";
|
||||
import webserver from "gulp-webserver";
|
||||
import { Config } from "../../../core/config";
|
||||
import { Platform } from "../../../core/type";
|
||||
import { Runner } from "../../core/runner";
|
||||
|
||||
export class Html5Runner extends Runner {
|
||||
constructor(config: Config, debug: boolean) {
|
||||
super(config, Platform.HTML5, debug);
|
||||
}
|
||||
|
||||
call() {
|
||||
return gulp.src(this.targetPath).pipe(
|
||||
webserver({
|
||||
// TODO: config?
|
||||
host: "0.0.0.0",
|
||||
port: 3000,
|
||||
open: true,
|
||||
fallback: "index.html",
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Runner.register(Platform.HTML5, Html5Runner);
|
||||
Reference in New Issue
Block a user