added log module

This commit is contained in:
2018-05-02 22:05:05 +03:00
parent c89833e80f
commit 3b26ae8b08
9 changed files with 124 additions and 77 deletions

View File

@@ -15,8 +15,6 @@ const {BuildSystem, Platform, Config} = require('./core');
const vfs = require('vinyl-fs');
const rename = require('gulp-rename');
const template = require('lodash.template');
const through = require('through2');
const Vinyl = require('vinyl');
const streamToPromise = (stream) => {
@@ -249,15 +247,7 @@ class FlashRunner extends Runner {
call() {
const target = this.targetPath;
const filename = path.resolve(target, this.config.meta.filename+'.swf');
const player = this.player.flashPlayerBin;
FlashPlayer.trust(filename);
fs.writeFileSync(FlashPlayer.log, '');
let result = gulp.src(filename)
.pipe(run(player + " <%=file.basename%>", {cwd: target, verbosity: 0}))
.pipe(through.obj(function (file, enc, callback) {
this.push(new Vinyl({path: FlashPlayer.log}));
callback();
}));
const result = this.player.run(filename, {cwd: target, verbosity: 0});
return this.log(result);
}
}