Switched gutil.log to fancyLog due to deprecation (#9432)

This commit is contained in:
Galymzhan Abdugalimov 2019-01-30 15:23:02 +01:00 committed by Brian Ng
parent 00c3e3c8e0
commit 7e9029e337
4 changed files with 27 additions and 1571 deletions

View File

@ -6,7 +6,7 @@ const chalk = require("chalk");
const newer = require("gulp-newer");
const babel = require("gulp-babel");
const gulpWatch = require("gulp-watch");
const gutil = require("gulp-util");
const fancyLog = require("fancy-log");
const filter = require("gulp-filter");
const gulp = require("gulp");
const path = require("path");
@ -38,7 +38,7 @@ function getIndexFromPackage(name) {
function compilationLogger(rollup) {
return through.obj(function(file, enc, callback) {
gutil.log(
fancyLog(
`Compiling '${chalk.cyan(file.relative)}'${
rollup ? " with rollup " : ""
}...`
@ -50,7 +50,7 @@ function compilationLogger(rollup) {
function errorsLogger() {
return plumber({
errorHandler(err) {
gutil.log(err.stack);
fancyLog(err.stack);
},
});
}

View File

@ -35,6 +35,7 @@
"eslint-config-babel": "^8.0.2",
"eslint-plugin-flowtype": "^3.2.1",
"eslint-plugin-prettier": "^3.0.1",
"fancy-log": "^1.3.3",
"flow-bin": "^0.87.0",
"graceful-fs": "^4.1.15",
"gulp": "^4.0.0",
@ -44,7 +45,6 @@
"gulp-plumber": "^1.2.1",
"gulp-rename": "^1.4.0",
"gulp-uglify": "^3.0.1",
"gulp-util": "^3.0.7",
"gulp-watch": "^5.0.1",
"husky": "^1.3.1",
"jest": "^24.0.0",
@ -132,5 +132,6 @@
"moduleNameMapper": {
"^@babel/([a-zA-Z0-9_-]+)$": "<rootDir>/packages/babel-$1/"
}
}
},
"dependencies": {}
}

View File

@ -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)

1579
yarn.lock

File diff suppressed because it is too large Load Diff