[build] remove deprecated gulp-utils
This commit is contained in:
@@ -2,14 +2,13 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const fse = require('fs-extra');
|
||||
const os = require('os');
|
||||
const gunzip = require('gulp-gunzip');
|
||||
const untar = require('gulp-untar');
|
||||
const through = require('through2');
|
||||
const gulp = require('gulp');
|
||||
const gutil = require('gulp-util');
|
||||
const Sdk = require('./sdk');
|
||||
const exec = require('./exec');
|
||||
const col = gutil.colors;
|
||||
const PluginError = require('plugin-error');
|
||||
const colors = require('ansi-colors');
|
||||
const log = require('fancy-log');
|
||||
|
||||
|
||||
class FlashPlayer extends Sdk {
|
||||
@@ -35,6 +34,7 @@ class FlashPlayer extends Sdk {
|
||||
const extract = (debug) => {
|
||||
const v = this.version.split('.');
|
||||
const playerPath = this.playerPath(debug);
|
||||
// ToDo: fix
|
||||
const archive = `${playerPath}/flashplayer${v[0]}_${v[1]}r${v[2]}_${v[3]}_linux_sa${debug ? '_debug' : ''}.${arch}.tar.gz`;
|
||||
return gulp.src(archive)
|
||||
.pipe(gunzip()).pipe(untar())
|
||||
@@ -120,20 +120,20 @@ class FlashPlayer extends Sdk {
|
||||
run(debug) {
|
||||
let stream = null;
|
||||
const bufferContents = (file, enc, callback) => {
|
||||
gutil.log(this.tag, col.cyan("run"), col.magenta(file.path));
|
||||
log(this.tag, colors.cyan("run"), colors.magenta(file.path));
|
||||
FlashPlayer.trust(file.path);
|
||||
FlashPlayer.enableLog();
|
||||
exec('.', [this.flashPlayerBin(debug), file.path].join(' ')).then(() => {
|
||||
stream.emit('end');
|
||||
callback();
|
||||
}).catch((error) => {
|
||||
stream.emit('error', new gutil.PluginError({plugin: this.tag, message: error}));
|
||||
stream.emit('error', new PluginError({plugin: this.tag, message: error}));
|
||||
callback();
|
||||
});
|
||||
//stream.push(file);
|
||||
// ToDo: watch when file is exists
|
||||
// or create log file in FlashPlayer.enableLog()?
|
||||
/*stream.push(new gutil.File({
|
||||
/*stream.push(new Vinyl({
|
||||
path: FlashPlayer.log
|
||||
}));*/
|
||||
stream.push(file);
|
||||
|
||||
Reference in New Issue
Block a user