-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild-fonts-folder.js
33 lines (23 loc) · 1.16 KB
/
build-fonts-folder.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const fs = require('fs')
const colores = require('./colores').colores
const purgeLabel = colores.purgeLabel
function callback(err) {
if (err) throw err
}
(function constructor() {
'use strict'
const detinationFontsFolder = './assets/fonts'
// FontAwesome
let sourceFontsFolder = './node_modules/@fortawesome/fontawesome-free/webfonts'
if (!fs.existsSync(detinationFontsFolder)) {
fs.mkdirSync(detinationFontsFolder)
}
fs.copyFile(sourceFontsFolder + '/fa-brands-400.ttf', detinationFontsFolder + '/FontAwesome6Brands-Regular.ttf', callback)
fs.copyFile(sourceFontsFolder + '/fa-regular-400.ttf', detinationFontsFolder + '/FontAwesome6Free-Regular.ttf', callback)
fs.copyFile(sourceFontsFolder + '/fa-solid-900.ttf', detinationFontsFolder + '/FontAwesome6Free-Solid.ttf', callback)
console.log(`${purgeLabel} Font Awesome Free copied to './assets/fonts'`)
// framework7Icons-Regular
sourceFontsFolder = './node_modules/framework7-icons/fonts'
fs.copyFile(sourceFontsFolder + '/Framework7Icons-Regular.ttf', detinationFontsFolder + '/Framework7-Icons.ttf', callback)
console.log(`${purgeLabel} Framework7-Icons.ttf copied to './assets/fonts'`)
}())