You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2014/06/07 23:04:38 UTC

[14/15] fauxton commit: updated refs/heads/import-master to 8cb432c

Fauxton: use local version of font awesome

We are currently referencing to Font-Awesome on a CDN in the
variables.less, which is basically nice, but some users of
CouchDB are firewalled at work and can just use the local
network.

Additionally offline people without internet can't use Fauxton
if the font is loaded via CDN.

This also removes the cache-buster for imgs (GET-Params with
version) in our routing for the local files of the dev-server
to make it work, in the future we might want to use a real
router module for the long if/else block.

Closes: COUCHDB-2238


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/453c8311
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/453c8311
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/453c8311

Branch: refs/heads/import-master
Commit: 453c83114d3fa05c638ac82098e4db2eb6880ad0
Parents: 61b481a
Author: Robert Kowalski <ro...@kowalski.gd>
Authored: Thu May 22 23:01:23 2014 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Thu Jun 5 20:59:25 2014 +0200

----------------------------------------------------------------------
 assets/less/bootstrap/font-awesome/variables.less | 4 ++--
 tasks/couchserver.js                              | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/453c8311/assets/less/bootstrap/font-awesome/variables.less
----------------------------------------------------------------------
diff --git a/assets/less/bootstrap/font-awesome/variables.less b/assets/less/bootstrap/font-awesome/variables.less
index bb2986d..5d93614 100644
--- a/assets/less/bootstrap/font-awesome/variables.less
+++ b/assets/less/bootstrap/font-awesome/variables.less
@@ -1,8 +1,8 @@
 // Variables
 // --------------------------
 
-//@FontAwesomePath:    "../../img";
-@FontAwesomePath:    "//netdna.bootstrapcdn.com/font-awesome/3.2.1/font"; // for referencing Bootstrap CDN font files directly
+@FontAwesomePath:    "../../img";
+//@FontAwesomePath:    "//netdna.bootstrapcdn.com/font-awesome/3.2.1/font"; // for referencing Bootstrap CDN font files directly
 @FontAwesomeVersion: "3.2.1";
 @borderColor:        #eee;
 @iconMuted:          #eee;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/453c8311/tasks/couchserver.js
----------------------------------------------------------------------
diff --git a/tasks/couchserver.js b/tasks/couchserver.js
index e1f18f9..67b0ae0 100644
--- a/tasks/couchserver.js
+++ b/tasks/couchserver.js
@@ -56,6 +56,7 @@ module.exports = function (grunt) {
       } else if (!!url.match(/mocha|\/test\/core\/|test\.config/)) {
         filePath = path.join('./test', url.replace('/test/',''));
       } else if (!!url.match(/\.css|img/)) {
+        url = url.replace(/\?.*/, '');
         filePath = path.join(dist_dir,url);
       /*} else if (!!url.match(/\/js\//)) {
         // serve any javascript or files from dist debug dir
@@ -87,7 +88,7 @@ module.exports = function (grunt) {
             res.end(JSON.stringify({error: err.message}));
           })
           .pipe(res);
-      } 
+      }
 
       proxy.proxyRequest(req, res);
     }).listen(port);