couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject git commit: updated refs/heads/master to 6cc028e
Date Wed, 08 Jan 2014 15:30:12 GMT
Updated Branches:
  refs/heads/master 53d394275 -> 6cc028ec6


removing HTML comments from JST templates

This lightens templates.js by removing HTML
comments from the templates.


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

Branch: refs/heads/master
Commit: 6cc028ec64f9b4d9a7e6646094b1ba1f51ec63ca
Parents: 53d3942
Author: BigBlueHat <byoung@bigbluehat.com>
Authored: Tue Jan 7 16:39:38 2014 -0500
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Wed Jan 8 17:27:56 2014 +0200

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6cc028ec/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 3afaa1f..49b52a4 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -160,10 +160,19 @@ module.exports = function(grunt) {
     // The concat task depends on this file to exist, so if you decide to
     // remove this, ensure concat is updated accordingly.
     jst: {
-      "dist/debug/templates.js": [
-        "app/templates/**/*.html",
-        "app/addons/**/templates/**/*.html"
-      ]
+      compile: {
+        options: {
+          processContent: function(src) {
+            return src.replace(/<!--[\s\S]*?-->/gm, '');
+          }
+        },
+        files: {
+          "dist/debug/templates.js": [
+            "app/templates/**/*.html",
+            "app/addons/**/templates/**/*.html"
+          ]
+        }
+      }
     },
 
     template: templateSettings,


Mime
View raw message