hardlounge/scripts/build-fontawesome.js

29 lines
571 B
JavaScript
Raw Normal View History

2016-06-04 20:55:21 +00:00
"use strict";
const colors = require("colors/safe");
const fs = require("fs-extra");
const log = require("../src/log");
2016-06-04 20:55:21 +00:00
const srcDir = "./node_modules/font-awesome/fonts/";
const destDir = "./client/fonts/";
const fonts = [
2016-06-04 20:55:21 +00:00
"fontawesome-webfont.woff",
"fontawesome-webfont.woff2"
];
fs.ensureDir(destDir, (dirErr) => {
2016-10-09 08:54:44 +00:00
if (dirErr) {
log.error(dirErr);
2016-06-04 20:55:21 +00:00
}
fonts.forEach((font) => {
fs.copy(srcDir + font, destDir + font, (err) => {
2016-06-04 20:55:21 +00:00
if (err) {
log.error(err);
2016-06-04 20:55:21 +00:00
} else {
log.info(colors.bold(font) + " successfully installed.");
2016-06-04 20:55:21 +00:00
}
});
});
});