summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrr- <rr-@sakuya.pl>2016-05-21 12:35:41 +0200
committerrr- <rr-@sakuya.pl>2016-05-21 12:35:41 +0200
commitf7215547248ca87619eeb75a251a5b17fbb2dd1d (patch)
tree26d441d530e2011c8903d9822c667200eda09b75
parentd8c20b89c63ddd71d4ecb9723f64cac4b1d12ad6 (diff)
client/build: don't use CDN for FontAwesome
-rw-r--r--client/build.js12
-rw-r--r--client/html/index.htm2
-rw-r--r--client/package.json1
3 files changed, 14 insertions, 1 deletions
diff --git a/client/build.js b/client/build.js
index 3858830..de06dd5 100644
--- a/client/build.js
+++ b/client/build.js
@@ -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() {
diff --git a/client/html/index.htm b/client/html/index.htm
index 2798138..4b84685 100644
--- a/client/html/index.htm
+++ b/client/html/index.htm
@@ -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>
diff --git a/client/package.json b/client/package.json
index 190d379..195fdb0 100644
--- a/client/package.json
+++ b/client/package.json
@@ -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",