From 4144db36937b4c11818dc5b95a26edc24b200678 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 5 Apr 2018 23:58:26 -0400 Subject: [PATCH] Replace (now deprecated) gulp-util with minimist and fancy-log --- gulpfile.js | 7 ++++--- package-lock.json | 48 ++++++++++++++++------------------------------- package.json | 3 ++- 3 files changed, 22 insertions(+), 36 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 8fc8b5e..ff8d8e1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,7 @@ // Core packages const gulp = require("gulp"), - gutil = require("gulp-util"), + minimist = require("minimist"), + log = require("fancy-log"), plumber = require("gulp-plumber"), concat = require("gulp-concat"); @@ -22,7 +23,7 @@ const browserify = require("browserify"), buffer = require("vinyl-buffer"); // Determine if gulp has been run with --production -const isProduction = gutil.env.production; +const isProduction = minimist(process.argv.slice(2)).production !== undefined; // Declare plugin settings const sassOutputStyle = isProduction ? "compressed" : "nested", @@ -76,7 +77,7 @@ const fontPaths = [ // Handle errors function handleError(err) { - gutil.log(err); + log.error(err); this.emit("end"); } diff --git a/package-lock.json b/package-lock.json index cdd9146..6073b0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2402,36 +2402,13 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fancy-log": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", - "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", "requires": { - "chalk": "1.1.3", + "ansi-gray": "0.1.1", + "color-support": "1.1.3", "time-stamp": "1.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } } }, "faye-websocket": { @@ -3288,7 +3265,7 @@ "beeper": "1.1.1", "chalk": "1.1.3", "dateformat": "2.2.0", - "fancy-log": "1.3.0", + "fancy-log": "1.3.2", "gulplog": "1.0.0", "has-gulplog": "0.1.0", "lodash._reescape": "3.0.0", @@ -4507,9 +4484,9 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mkdirp": { "version": "0.5.1", @@ -4517,6 +4494,13 @@ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } } }, "module-deps": { diff --git a/package.json b/package.json index 23f9f07..e2c16d2 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "bootstrap": "^4.0.0", "browserify": "^16.1.1", "es6-promise": "^4.2.4", + "fancy-log": "^1.3.2", "font-awesome": "^4.7.0", "gsap": "^1.20.4", "gulp": "^3.9.1", @@ -27,8 +28,8 @@ "gulp-sass-glob": "^1.0.8", "gulp-strip-debug": "^3.0.0", "gulp-uglify": "^3.0.0", - "gulp-util": "^3.0.8", "jquery": "^3.3.1", + "minimist": "^1.2.0", "popper.js": "^1.14.1", "vinyl-buffer": "^1.0.1", "vinyl-source-stream": "^2.0.0",