Switch Font Awesome build script to use our logger

This commit is contained in:
Jérémie Astori 2017-09-17 22:19:32 -04:00
parent 82c4898715
commit aa377ee59b
No known key found for this signature in database
GPG Key ID: B9A4F245CD67BDE8

View File

@ -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.");
}
});
});