diff options
author | BigBlueHat <byoung@bigbluehat.com> | 2014-01-07 16:39:38 -0500 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2014-01-08 17:27:56 +0200 |
commit | 6cc028ec64f9b4d9a7e6646094b1ba1f51ec63ca (patch) | |
tree | a6182771bfbb5cccc5e1127f66c6aa0b79e72b22 | |
parent | 53d3942754858de2f90e328745ccb3d31f9c032a (diff) | |
download | couchdb-6cc028ec64f9b4d9a7e6646094b1ba1f51ec63ca.tar.gz |
removing HTML comments from JST templates
This lightens templates.js by removing HTML
comments from the templates.
-rw-r--r-- | src/fauxton/Gruntfile.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js index 3afaa1f62..49b52a4e9 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, |