Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F335106F0 for ; Tue, 1 Apr 2014 09:15:59 +0000 (UTC) Received: (qmail 72254 invoked by uid 500); 1 Apr 2014 09:14:31 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 72074 invoked by uid 500); 1 Apr 2014 09:14:26 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 71669 invoked by uid 99); 1 Apr 2014 09:14:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2014 09:14:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DC3B691B366; Tue, 1 Apr 2014 09:14:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kxepal@apache.org To: commits@couchdb.apache.org Date: Tue, 01 Apr 2014 09:14:21 -0000 Message-Id: <983a7db63f2f4d2892173e67312de3dd@git.apache.org> In-Reply-To: <9743a3d508544bf2a0aaca36a1819b74@git.apache.org> References: <9743a3d508544bf2a0aaca36a1819b74@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/50] [abbrv] fauxton commit: updated refs/heads/import-master to b32c617 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-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/4b796487 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/4b796487 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/4b796487 Branch: refs/heads/import-master Commit: 4b7964871446e3fafb46b0467ecdd5438a5096ae Parents: ffa3f9b Author: Robert Kowalski Authored: Wed Mar 5 20:34:02 2014 +0100 Committer: Robert Kowalski Committed: Wed Mar 5 20:38:43 2014 +0100 ---------------------------------------------------------------------- tasks/fauxton.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4b796487/tasks/fauxton.js ---------------------------------------------------------------------- diff --git a/tasks/fauxton.js b/tasks/fauxton.js index e54bab8..e06e7dc 100644 --- a/tasks/fauxton.js +++ b/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",