You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/01/24 20:39:05 UTC

git commit: Fix serve command when config.xml is in the root (not within www/)

Updated Branches:
  refs/heads/master 95ae4893e -> 75ceb5b80


Fix serve command when config.xml is in the root (not within www/)


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/75ceb5b8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/75ceb5b8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/75ceb5b8

Branch: refs/heads/master
Commit: 75ceb5b80c8bba2fe32b694c7ebf749ef63fa7a3
Parents: 95ae489
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri Jan 24 14:38:43 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Jan 24 14:38:43 2014 -0500

----------------------------------------------------------------------
 src/serve.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/75ceb5b8/src/serve.js
----------------------------------------------------------------------
diff --git a/src/serve.js b/src/serve.js
index 3e24b8a..577d9b4 100644
--- a/src/serve.js
+++ b/src/serve.js
@@ -24,7 +24,6 @@ var cordova_util = require('./util'),
     config_parser = require('./config_parser'),
     hooker        = require('./hooker'),
     fs = require('fs'),
-    util = require('util'),
     http = require("http"),
     url = require("url"),
     mime = require("mime"),
@@ -46,7 +45,7 @@ function launchServer(projectRoot, port) {
         }
         function doRoot() {
             response.writeHead(200, {"Content-Type": "text/html"});
-            var config = new cordova_util.config_parser(path.join(projectRoot, "www/config.xml"));
+            var config = new cordova_util.config_parser(cordova_util.projectConfig(projectRoot));
             response.write("<html><head><title>"+config.name()+"</title></head><body>");
             response.write("<table border cellspacing=0><thead><caption><h3>Package Metadata</h3></caption></thead><tbody>");
             for (var c in {"name": true, "packageName": true, "version": true}) {