Switched gutil.log to fancyLog due to deprecation (#9432)
This commit is contained in:
parent
00c3e3c8e0
commit
7e9029e337
@ -6,7 +6,7 @@ const chalk = require("chalk");
|
|||||||
const newer = require("gulp-newer");
|
const newer = require("gulp-newer");
|
||||||
const babel = require("gulp-babel");
|
const babel = require("gulp-babel");
|
||||||
const gulpWatch = require("gulp-watch");
|
const gulpWatch = require("gulp-watch");
|
||||||
const gutil = require("gulp-util");
|
const fancyLog = require("fancy-log");
|
||||||
const filter = require("gulp-filter");
|
const filter = require("gulp-filter");
|
||||||
const gulp = require("gulp");
|
const gulp = require("gulp");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
@ -38,7 +38,7 @@ function getIndexFromPackage(name) {
|
|||||||
|
|
||||||
function compilationLogger(rollup) {
|
function compilationLogger(rollup) {
|
||||||
return through.obj(function(file, enc, callback) {
|
return through.obj(function(file, enc, callback) {
|
||||||
gutil.log(
|
fancyLog(
|
||||||
`Compiling '${chalk.cyan(file.relative)}'${
|
`Compiling '${chalk.cyan(file.relative)}'${
|
||||||
rollup ? " with rollup " : ""
|
rollup ? " with rollup " : ""
|
||||||
}...`
|
}...`
|
||||||
@ -50,7 +50,7 @@ function compilationLogger(rollup) {
|
|||||||
function errorsLogger() {
|
function errorsLogger() {
|
||||||
return plumber({
|
return plumber({
|
||||||
errorHandler(err) {
|
errorHandler(err) {
|
||||||
gutil.log(err.stack);
|
fancyLog(err.stack);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,7 @@
|
|||||||
"eslint-config-babel": "^8.0.2",
|
"eslint-config-babel": "^8.0.2",
|
||||||
"eslint-plugin-flowtype": "^3.2.1",
|
"eslint-plugin-flowtype": "^3.2.1",
|
||||||
"eslint-plugin-prettier": "^3.0.1",
|
"eslint-plugin-prettier": "^3.0.1",
|
||||||
|
"fancy-log": "^1.3.3",
|
||||||
"flow-bin": "^0.87.0",
|
"flow-bin": "^0.87.0",
|
||||||
"graceful-fs": "^4.1.15",
|
"graceful-fs": "^4.1.15",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
@ -44,7 +45,6 @@
|
|||||||
"gulp-plumber": "^1.2.1",
|
"gulp-plumber": "^1.2.1",
|
||||||
"gulp-rename": "^1.4.0",
|
"gulp-rename": "^1.4.0",
|
||||||
"gulp-uglify": "^3.0.1",
|
"gulp-uglify": "^3.0.1",
|
||||||
"gulp-util": "^3.0.7",
|
|
||||||
"gulp-watch": "^5.0.1",
|
"gulp-watch": "^5.0.1",
|
||||||
"husky": "^1.3.1",
|
"husky": "^1.3.1",
|
||||||
"jest": "^24.0.0",
|
"jest": "^24.0.0",
|
||||||
@ -132,5 +132,6 @@
|
|||||||
"moduleNameMapper": {
|
"moduleNameMapper": {
|
||||||
"^@babel/([a-zA-Z0-9_-]+)$": "<rootDir>/packages/babel-$1/"
|
"^@babel/([a-zA-Z0-9_-]+)$": "<rootDir>/packages/babel-$1/"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ const path = require("path");
|
|||||||
const pump = require("pump");
|
const pump = require("pump");
|
||||||
const chalk = require("chalk");
|
const chalk = require("chalk");
|
||||||
const through = require("through2");
|
const through = require("through2");
|
||||||
const gutil = require("gulp-util");
|
const fancyLog = require("fancy-log");
|
||||||
const rename = require("gulp-rename");
|
const rename = require("gulp-rename");
|
||||||
const RootMostResolvePlugin = require("webpack-dependency-suite")
|
const RootMostResolvePlugin = require("webpack-dependency-suite")
|
||||||
.RootMostResolvePlugin;
|
.RootMostResolvePlugin;
|
||||||
@ -92,14 +92,14 @@ function webpackBuild(opts) {
|
|||||||
return webpackStream(config, webpack);
|
return webpackStream(config, webpack);
|
||||||
// To write JSON for debugging:
|
// To write JSON for debugging:
|
||||||
/*return webpackStream(config, webpack, (err, stats) => {
|
/*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()));
|
require('fs').writeFileSync('webpack-debug.json', JSON.stringify(stats.toJson()));
|
||||||
});*/
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function logUglify() {
|
function logUglify() {
|
||||||
return through.obj(function(file, enc, callback) {
|
return through.obj(function(file, enc, callback) {
|
||||||
gutil.log(
|
fancyLog(
|
||||||
`Minifying '${chalk.cyan(
|
`Minifying '${chalk.cyan(
|
||||||
path.relative(path.join(__dirname, ".."), file.path)
|
path.relative(path.join(__dirname, ".."), file.path)
|
||||||
)}'...`
|
)}'...`
|
||||||
@ -110,7 +110,7 @@ function logUglify() {
|
|||||||
|
|
||||||
function logNoUglify() {
|
function logNoUglify() {
|
||||||
return through.obj(function(file, enc, callback) {
|
return through.obj(function(file, enc, callback) {
|
||||||
gutil.log(
|
fancyLog(
|
||||||
chalk.yellow(
|
chalk.yellow(
|
||||||
`Skipped minification of '${chalk.cyan(
|
`Skipped minification of '${chalk.cyan(
|
||||||
path.relative(path.join(__dirname, ".."), file.path)
|
path.relative(path.join(__dirname, ".."), file.path)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user