From 8a3abaa73596ceafc7bf39419d7eb407fc6dd77f Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Sat, 11 Apr 2020 04:02:15 -0600 Subject: [PATCH] output report from prettier to console using fancy-log --- gulp.d/lib/gulp-prettier-eslint.js | 5 +++-- package.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gulp.d/lib/gulp-prettier-eslint.js b/gulp.d/lib/gulp-prettier-eslint.js index dca0a74..552df28 100644 --- a/gulp.d/lib/gulp-prettier-eslint.js +++ b/gulp.d/lib/gulp-prettier-eslint.js @@ -1,5 +1,6 @@ 'use strict' +const log = require('fancy-log') const { obj: map } = require('through2') const PluginError = require('plugin-error') const prettierEslint = require('prettier-eslint') @@ -17,9 +18,9 @@ module.exports = () => { .concat(' file') .concat(report.unchanged === 1 ? '' : 's') .concat(' unchanged') - console.log(`prettier-eslint: ${changed}; ${unchanged}`) + log(`prettier-eslint: ${changed}; ${unchanged}`) } else { - console.log(`prettier-eslint: left ${report.unchanged} file${report.unchanged === 1 ? '' : 's'} unchanged`) + log(`prettier-eslint: left ${report.unchanged} file${report.unchanged === 1 ? '' : 's'} unchanged`) } }) diff --git a/package.json b/package.json index 0784b73..cecdda4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "eslint-plugin-node": "~11.1", "eslint-plugin-promise": "~4.2", "eslint-plugin-standard": "~4.0", + "fancy-log": "~1.3", "fs-extra": "~8.1", "gulp": "~4.0", "gulp-concat": "~2.6", -- 2.11.0