cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [05/15] git commit: Fix serve command when config.xml is in the root (not within www/)
Date Thu, 30 Jan 2014 23:16:54 GMT
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/b661f283
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/b661f283
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/b661f283

Branch: refs/heads/master
Commit: b661f283376b9affa5e198f5122588bd9c1f4fc3
Parents: 5a2f72f
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Fri Jan 24 14:38:43 2014 -0500
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Thu Jan 30 15:11:53 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/b661f283/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}) {


Mime
View raw message