client/build: don't use CDN for FontAwesome

This commit is contained in:
rr- 2016-05-21 12:35:41 +02:00
parent d8c20b89c6
commit f721554724
3 changed files with 14 additions and 1 deletions

View file

@ -120,6 +120,10 @@ function bundleCss() {
}
writeFile('./public/css/app.min.css', minifyCss(css));
copyFile(
'./node_modules/font-awesome/css/font-awesome.min.css',
'./public/css/vendor.min.css');
console.info('Bundled CSS');
});
}
@ -177,6 +181,14 @@ function bundleJs(config) {
function bundleConfig(config) {
writeFile(
'./js/.config.autogen.json', JSON.stringify(config));
glob('./node_modules/font-awesome/fonts/*.*', {}, (er, files) => {
for (let file of files) {
if (fs.lstatSync(file).isDirectory()) {
continue;
}
copyFile(file, path.join('./public/fonts/', path.basename(file)));
}
});
}
function bundleBinaryAssets() {

View file

@ -5,7 +5,7 @@
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title><!-- configured in the config file --></title>
<link href='/css/app.min.css' rel='stylesheet' type='text/css'/>
<link href='//maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css' rel='stylesheet' type='text/css'/>
<link href='/css/vendor.min.css' rel='stylesheet' type='text/css'/>
<link href='//fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'/>
<link rel='shortcut icon' type='image/png' href='/img/favicon.png'/>
</head>

View file

@ -13,6 +13,7 @@
"camelcase": "^2.1.1",
"camelcase-keys": "*",
"csso": "^1.8.0",
"font-awesome": "^4.6.1",
"glob": "^7.0.3",
"html-minifier": "^1.3.1",
"js-cookie": "^2.1.0",