couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [04/12] couchdb commit: updated refs/heads/2128-autocomplete-section-name to 6e93561
Date Thu, 06 Mar 2014 21:32:11 GMT
remove warning when running `grunt dev`

This removes the warning 'path.existsSync is now called
fs.existsSync'. Now having one require at the top of the file,
as module.require caches requires anyway.


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

Branch: refs/heads/2128-autocomplete-section-name
Commit: 0782a44ce6f54aa553e014acfa3bb11448c0682e
Parents: 77724c9
Author: Robert Kowalski <rok@kowalski.gd>
Authored: Wed Mar 5 20:34:02 2014 +0100
Committer: Robert Kowalski <rok@kowalski.gd>
Committed: Wed Mar 5 20:38:43 2014 +0100

----------------------------------------------------------------------
 src/fauxton/tasks/fauxton.js | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0782a44c/src/fauxton/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/fauxton.js b/src/fauxton/tasks/fauxton.js
index e54bab8..e06e7dc 100644
--- a/src/fauxton/tasks/fauxton.js
+++ b/src/fauxton/tasks/fauxton.js
@@ -11,7 +11,8 @@
 // the License.
 
 module.exports = function(grunt) {
-  var _ = grunt.util._;
+  var _ = grunt.util._,
+      fs = require('fs');
 
   grunt.registerMultiTask('template', 'generates an html file from a specified template',
function(){
     var data = this.data,
@@ -24,11 +25,10 @@ module.exports = function(grunt) {
   grunt.registerMultiTask('get_deps', 'Fetch external dependencies', function(version) {
     grunt.log.writeln("Fetching external dependencies");
 
-    var path = require('path');
-        done = this.async(),
+    var done = this.async(),
         data = this.data,
         target = data.target || "app/addons/",
-        settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default",
+        settingsFile = fs.existsSync(data.src) ? data.src : "settings.json.default",
         settings = grunt.file.readJSON(settingsFile),
         _ = grunt.util._;
 
@@ -76,10 +76,9 @@ module.exports = function(grunt) {
   });
 
   grunt.registerMultiTask('gen_load_addons', 'Generate the load_addons.js file', function()
{
-    var path = require('path');
-        data = this.data,
+    var data = this.data,
         _ = grunt.util._,
-        settingsFile = path.existsSync(data.src) ? data.src : "settings.json.default",
+        settingsFile = fs.existsSync(data.src) ? data.src : "settings.json.default",
         settings = grunt.file.readJSON(settingsFile),
         template = "app/load_addons.js.underscore",
         dest = "app/load_addons.js",


Mime
View raw message