[tail] added TailVinyl class
This commit is contained in:
@@ -6,6 +6,7 @@ const through = require('through2');
|
||||
const Sdk = require('./sdk');
|
||||
const Vinyl = require('vinyl');
|
||||
const run = require('../run/index');
|
||||
const {TailVinyl} = require('./tail');
|
||||
|
||||
|
||||
class FlashPlayer extends Sdk {
|
||||
@@ -99,7 +100,11 @@ class FlashPlayer extends Sdk {
|
||||
FlashPlayer.enableLog();
|
||||
return run(`${this.flashPlayerBin} ${filename}`, params).exec()
|
||||
.pipe(through.obj(function (file, enc, callback) {
|
||||
this.push(new Vinyl({path: FlashPlayer.log}));
|
||||
const log = new TailVinyl({
|
||||
path: FlashPlayer.log,
|
||||
});
|
||||
this.on('end', () => log.dispose());
|
||||
this.push(log);
|
||||
callback();
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user