thelounge/scripts/build-fontawesome.js

27 lines
502 B
JavaScript
Raw Normal View History

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