You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2013/07/22 12:25:50 UTC

[33/50] [abbrv] git commit: updated refs/heads/1684-feature-db-updates to ea07223

Fauxton: Add dependancies to watch path instead of custom watch path


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

Branch: refs/heads/1684-feature-db-updates
Commit: 6e8f47c7f504abbfdef3ddfa63aa9a8826e94445
Parents: e204f0d
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Jul 1 15:24:00 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Jul 1 15:24:00 2013 +0200

----------------------------------------------------------------------
 src/fauxton/Gruntfile.js          |  2 +-
 src/fauxton/settings.json.default |  4 ----
 src/fauxton/tasks/helper.js       | 14 +++++++++++++-
 3 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6e8f47c7/src/fauxton/Gruntfile.js
----------------------------------------------------------------------
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 35a2c67..700246f 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -206,7 +206,7 @@ module.exports = function(grunt) {
     },
 
     watch: {
-      files: helper.readSettingsFile().watch.files,
+      files: helper.watchFiles(["./app/**/*"]),
       tasks: ['debug', 'template']
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6e8f47c7/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index 051e3fb..9716ceb 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -24,9 +24,5 @@
           "okay_if_missing": true
         }
       }
-    },
-
-    "watch": {
-      "files": ["./app/**/*"]
     }
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6e8f47c7/src/fauxton/tasks/helper.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/helper.js b/src/fauxton/tasks/helper.js
index 5178ee2..a7eddbf 100644
--- a/src/fauxton/tasks/helper.js
+++ b/src/fauxton/tasks/helper.js
@@ -10,9 +10,11 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-var fs = require('fs');
+var fs = require('fs'),
+    path = require('path');
 
 exports.init = function(grunt) {
+  var _ = grunt.util._;
 
   return { 
     readSettingsFile: function () {
@@ -27,6 +29,16 @@ exports.init = function(grunt) {
 
     processAddons: function (callback) {
       this.readSettingsFile().deps.forEach(callback);
+    },
+
+    watchFiles: function (defaults) {
+      return _.reduce(this.readSettingsFile().deps, function (files, dep) { 
+        if (dep.path) { 
+          files.push(path.join(dep.path, '**/*'));
+        }
+        return files
+      }, defaults);
+
     }
   };
 };