Skip to content

Commit

Permalink
Switched gutil.log to fancyLog due to deprecation (babel#9432)
Browse files Browse the repository at this point in the history
  • Loading branch information
naffiq authored and existentialism committed Jan 30, 2019
1 parent 00c3e3c commit 7e9029e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1,571 deletions.
6 changes: 3 additions & 3 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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 " : ""
}...`
Expand All @@ -50,7 +50,7 @@ function compilationLogger(rollup) {
function errorsLogger() {
return plumber({
errorHandler(err) {
gutil.log(err.stack);
fancyLog(err.stack);
},
});
}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -132,5 +132,6 @@
"moduleNameMapper": {
"^@babel/([a-zA-Z0-9_-]+)$": "<rootDir>/packages/babel-$1/"
}
}
},
"dependencies": {}
}
8 changes: 4 additions & 4 deletions scripts/gulp-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
)}'...`
Expand All @@ -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)
Expand Down
Loading

0 comments on commit 7e9029e

Please sign in to comment.