You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2017/02/21 14:52:20 UTC

fauxton commit: updated refs/heads/master to ecc0846

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 65016d595 -> ecc084618


fix deployment to work with styles.css


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

Branch: refs/heads/master
Commit: ecc08461848b4b6dac4932b68407914408ba46ee
Parents: 65016d5
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Feb 21 16:04:53 2017 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Feb 21 16:34:46 2017 +0200

----------------------------------------------------------------------
 Gruntfile.js               | 13 ++++++++++++-
 assets/index.underscore    |  2 +-
 settings.json.default.json |  2 +-
 3 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ecc08461/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 25b1157..61d6cc4 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -208,6 +208,17 @@ module.exports = function (grunt) {
             config.template.release.variables.bundlejs = config.template.release.variables.bundlejs.replace(/BUNDLEJS_FILE/, newFilename);
           }
         }
+      },
+
+      css: {
+        files: { 'dist/release/': 'dist/release/styles.css' },
+        options: {
+          afterEach: function (fileChanges) {
+            // replace the CSS_FILE placeholder with the actual filename
+            const newFilename = path.basename(fileChanges.newPath);
+            config.template.release.variables.css = config.template.release.variables.css.replace(/CSS_FILE/, newFilename);
+          }
+        }
       }
     },
 
@@ -245,7 +256,7 @@ module.exports = function (grunt) {
 
   // minify code and css, ready for release.
   grunt.registerTask('build', ['copy:distDepsRequire', 'shell:webpackrelease',
-    'md5:bundlejs', 'template:release']);
+    'md5:bundlejs', 'md5:css', 'template:release']);
   /*
    * Build the app in either dev, debug, or release mode
    */

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ecc08461/assets/index.underscore
----------------------------------------------------------------------
diff --git a/assets/index.underscore b/assets/index.underscore
index 8763a82..2d97e0b 100644
--- a/assets/index.underscore
+++ b/assets/index.underscore
@@ -22,7 +22,7 @@
   <title>Project Fauxton</title>
 
   <% if (!development) { %>
-  <link rel="stylesheet" href="styles.css"/>
+  <link rel="stylesheet" href="<%= css %>"/>
   <% } %>
   <!-- Application styles. -->
   <style>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ecc08461/settings.json.default.json
----------------------------------------------------------------------
diff --git a/settings.json.default.json b/settings.json.default.json
index 510f7f2..0f5756e 100644
--- a/settings.json.default.json
+++ b/settings.json.default.json
@@ -36,7 +36,7 @@
         "dest": "dist/debug/index.html",
         "variables": {
           "bundlejs": "./dashboard.assets/js/BUNDLEJS_FILE",
-          "css": "./dashboard.assets/css/CSS_FILE",
+          "css": "./CSS_FILE",
           "base": null,
           "development": false
         },