couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject fauxton commit: updated refs/heads/master to 158c208
Date Mon, 21 Dec 2015 22:59:14 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master b5247fcd8 -> 158c2083a


Configurable 'Generated: [date]' comments

A while back we added in a comment to the foot of the generated
index.html file containing a "Generated: [data]" text. This has
proven to be extremely useful.

This PR just expands on it a little to make the label itself
configurable. So for environments using different bundles of
the Fauxton code, it can output the build target name, plus
the generation date, e.g.

<!-- Env X. Generated: [date] -->


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

Branch: refs/heads/master
Commit: 158c2083ae551967a745e31e9127be53c759ed8c
Parents: b5247fc
Author: Ben Keen <ben.keen@gmail.com>
Authored: Mon Dec 21 13:44:22 2015 -0800
Committer: Ben Keen <ben.keen@gmail.com>
Committed: Mon Dec 21 13:44:22 2015 -0800

----------------------------------------------------------------------
 Gruntfile.js            | 3 +++
 assets/index.underscore | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/158c2083/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 4b7574a..09eed4c 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -107,6 +107,9 @@ module.exports = function (grunt) {
 
     Object.keys(settings.template).forEach(function (key) {
       settings.template[key].variables.generationDate = new Date().toISOString();
+      if (!settings.template[key].variables.generationLabel) {
+        settings.template[key].variables.generationLabel = 'Generated: ';
+      }
       settings.template[key].app.i18n = i18n;
     });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/158c2083/assets/index.underscore
----------------------------------------------------------------------
diff --git a/assets/index.underscore b/assets/index.underscore
index 17078fa..bb35bf0 100644
--- a/assets/index.underscore
+++ b/assets/index.underscore
@@ -45,7 +45,7 @@
   <!-- Application source. -->
   <script data-main="/config" src="<%= requirejs %>"></script>
 
-  <!-- Generated: <%= generationDate %> -->
+  <!-- <%= generationLabel %><%= generationDate %> -->
 
 </body>
 </html>


Mime
View raw message