Switched gutil.log to fancyLog due to deprecation (#9432)
This commit is contained in:
committed by
Brian Ng
parent
00c3e3c8e0
commit
7e9029e337
@@ -15,7 +15,7 @@ const path = require("path");
|
||||
const pump = require("pump");
|
||||
const chalk = require("chalk");
|
||||
const through = require("through2");
|
||||
const gutil = require("gulp-util");
|
||||
const fancyLog = require("fancy-log");
|
||||
const rename = require("gulp-rename");
|
||||
const RootMostResolvePlugin = require("webpack-dependency-suite")
|
||||
.RootMostResolvePlugin;
|
||||
@@ -92,14 +92,14 @@ function webpackBuild(opts) {
|
||||
return webpackStream(config, webpack);
|
||||
// To write JSON for debugging:
|
||||
/*return webpackStream(config, webpack, (err, stats) => {
|
||||
require('gulp-util').log(stats.toString({colors: true}));
|
||||
require('fancy-log')(stats.toString({colors: true}));
|
||||
require('fs').writeFileSync('webpack-debug.json', JSON.stringify(stats.toJson()));
|
||||
});*/
|
||||
}
|
||||
|
||||
function logUglify() {
|
||||
return through.obj(function(file, enc, callback) {
|
||||
gutil.log(
|
||||
fancyLog(
|
||||
`Minifying '${chalk.cyan(
|
||||
path.relative(path.join(__dirname, ".."), file.path)
|
||||
)}'...`
|
||||
@@ -110,7 +110,7 @@ function logUglify() {
|
||||
|
||||
function logNoUglify() {
|
||||
return through.obj(function(file, enc, callback) {
|
||||
gutil.log(
|
||||
fancyLog(
|
||||
chalk.yellow(
|
||||
`Skipped minification of '${chalk.cyan(
|
||||
path.relative(path.join(__dirname, ".."), file.path)
|
||||
|
||||
Reference in New Issue
Block a user