From aa377ee59b125cc409ef1cd9179c8f1871a1c50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 17 Sep 2017 22:19:32 -0400 Subject: [PATCH] Switch Font Awesome build script to use our logger --- scripts/build-fontawesome.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/scripts/build-fontawesome.js b/scripts/build-fontawesome.js index 79688fa3..74be669a 100644 --- a/scripts/build-fontawesome.js +++ b/scripts/build-fontawesome.js @@ -1,26 +1,27 @@ -/* eslint-disable no-console */ "use strict"; -var fs = require("fs-extra"); +const colors = require("colors/safe"); +const fs = require("fs-extra"); +const log = require("../src/log"); -var srcDir = "./node_modules/font-awesome/fonts/"; -var destDir = "./client/fonts/"; -var fonts = [ +const srcDir = "./node_modules/font-awesome/fonts/"; +const destDir = "./client/fonts/"; +const fonts = [ "fontawesome-webfont.woff", "fontawesome-webfont.woff2" ]; -fs.ensureDir(destDir, function(dirErr) { +fs.ensureDir(destDir, (dirErr) => { if (dirErr) { - console.error(dirErr); + log.error(dirErr); } - fonts.forEach(function(font) { - fs.copy(srcDir + font, destDir + font, function(err) { + fonts.forEach((font) => { + fs.copy(srcDir + font, destDir + font, (err) => { if (err) { - console.error(err); + log.error(err); } else { - console.log(font + " successfully installed."); + log.info(colors.bold(font) + " successfully installed."); } }); });