refactor: refork tail module
This commit is contained in:
+2
-14
@@ -2,10 +2,9 @@ import fs from "fs";
|
||||
import fse from "fs-extra";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import through from "through2";
|
||||
import { Env } from "../common/env";
|
||||
import { System } from "../common/system";
|
||||
import { TailVinyl } from "../common/tail";
|
||||
import { watch } from "../common/watch";
|
||||
import { Sdk } from "../core/sdk";
|
||||
import run from "../run";
|
||||
|
||||
@@ -120,17 +119,6 @@ export class FlashPlayer extends Sdk {
|
||||
this.log.i("_run_ *%s*", filename);
|
||||
FlashPlayer.trust(filename);
|
||||
FlashPlayer.enableLog();
|
||||
return run(`${this.flashPlayerBin} ${filename}`, params)
|
||||
.exec()
|
||||
.pipe(
|
||||
through.obj(function (file: any, enc: string, callback: any) {
|
||||
const log = new TailVinyl({
|
||||
path: FlashPlayer.log,
|
||||
});
|
||||
this.on("end", () => log.dispose());
|
||||
this.push(log);
|
||||
callback();
|
||||
}),
|
||||
);
|
||||
return run(`${this.flashPlayerBin} ${filename}`, params).exec().pipe(watch(FlashPlayer.log));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user