Repository: cordova-lib
Updated Branches:
  refs/heads/master a54005557 -> 3623a84eb


[CB-6879] config parser breakout into a cordova level module

internal referencing is weak (relative paths)
10 squashed commits

package.json added to root, so that package.json can be linked from git/hub url 
as well as npm registry

updated create.js to consume configparser module from root of cordova-lib 
master module

config parser readme skeleton

[docs] document configparser module

updated create test to use modular ConfigParser

metadata parsers now consume the Cordova-Lib ConfigParser module

references the source by relative path
improvement would be for each module to be referenced through npm

cordova lib functions refer to modularized ConfigParser

removed ConfigParser implementation from cordova

tracking config parser test suite


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/3623a84e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/3623a84e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/3623a84e

Branch: refs/heads/master
Commit: 3623a84eb391f41c5a32ddc67eea89512c4ba654
Parents: a540055
Author: Lorin Beer <[email protected]>
Authored: Wed Jun 4 23:52:13 2014 -0700
Committer: Lorin Beer <[email protected]>
Committed: Mon Jun 9 10:18:07 2014 -0700

----------------------------------------------------------------------
 cordova-lib/cordova-lib.js                      |   3 +-
 cordova-lib/spec-cordova/ConfigParser.spec.js   |  99 ----------
 cordova-lib/spec-cordova/create.spec.js         |   2 +-
 .../metadata/android_parser.spec.js             |   2 +-
 .../metadata/blackberry_parser.spec.js          |   2 +-
 .../metadata/firefoxos_parser.spec.js           |   2 +-
 .../spec-cordova/metadata/ios_parser.spec.js    |   2 +-
 .../metadata/windows8_parser.spec.js            |   2 +-
 .../spec-cordova/metadata/wp8_parser.spec.js    |   2 +-
 cordova-lib/spec-cordova/prepare.spec.js        |   2 +-
 cordova-lib/spec-cordova/restore.spec.js        |   2 +-
 cordova-lib/spec-cordova/save.spec.js           |   2 +-
 cordova-lib/src/configparser/ConfigParser.js    | 179 +++++++++++++++++++
 .../src/configparser/ConfigParser.spec.js       |  99 ++++++++++
 cordova-lib/src/configparser/README.md          |  86 +++++++++
 cordova-lib/src/cordova/ConfigParser.js         | 179 -------------------
 cordova-lib/src/cordova/create.js               |   2 +-
 .../cordova/metadata/amazon_fireos_parser.js    |   2 +-
 .../src/cordova/metadata/android_parser.js      |   2 +-
 .../src/cordova/metadata/blackberry10_parser.js |   2 +-
 .../src/cordova/metadata/firefoxos_parser.js    |   2 +-
 cordova-lib/src/cordova/metadata/ios_parser.js  |   2 +-
 .../src/cordova/metadata/ubuntu_parser.js       |   2 +-
 .../src/cordova/metadata/windows8_parser.js     |   2 +-
 cordova-lib/src/cordova/metadata/wp8_parser.js  |   2 +-
 cordova-lib/src/cordova/platform.js             |   2 +-
 cordova-lib/src/cordova/plugin.js               |   2 +-
 cordova-lib/src/cordova/prepare.js              |   2 +-
 cordova-lib/src/cordova/restore.js              |   2 +-
 cordova-lib/src/cordova/save.js                 |   2 +-
 cordova-lib/src/cordova/serve.js                |   2 +-
 package.json                                    | 162 +++++++++++++++++
 32 files changed, 553 insertions(+), 304 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/cordova-lib.js
----------------------------------------------------------------------
diff --git a/cordova-lib/cordova-lib.js b/cordova-lib/cordova-lib.js
index 9d7d9d8..61db83b 100644
--- a/cordova-lib/cordova-lib.js
+++ b/cordova-lib/cordova-lib.js
@@ -17,7 +17,7 @@
     under the License.
 */
 
-// For now expose plagman and cordova just as they were in the old repos
+// For now expose plugman and cordova just as they were in the old repos
 exports = module.exports = {
     set binname(name) {
         this.cordova.binname = name;
@@ -27,6 +27,7 @@ exports = module.exports = {
     },
     plugman: require('./src/plugman/plugman'),
     cordova: require('./src/cordova/cordova'),
+    configparser: require('./src/configparser/ConfigParser.js'),
     cordova_platforms: require('./src/cordova/platforms'),
     ////  MAIN CORDOVA TOOLS API
     CordovaError: require('./src/CordovaError')

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/ConfigParser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/ConfigParser.spec.js 
b/cordova-lib/spec-cordova/ConfigParser.spec.js
deleted file mode 100644
index a1ba102..0000000
--- a/cordova-lib/spec-cordova/ConfigParser.spec.js
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-*/
-var path = require('path'),
-    fs = require('fs'),
-    ConfigParser = require('../src/cordova/ConfigParser'),
-    xml = path.join(__dirname, 'test-config.xml'),
-    xml_contents = fs.readFileSync(xml, 'utf-8');
-
-describe('config.xml parser', function () {
-    var readFile;
-    beforeEach(function() {
-        readFile = spyOn(fs, 'readFileSync').andReturn(xml_contents);
-    });
-
-    it('should create an instance based on an xml file', function() {
-        var cfg;
-        expect(function () {
-            cfg = new ConfigParser(xml);
-        }).not.toThrow();
-        expect(cfg).toBeDefined();
-        expect(cfg.doc).toBeDefined();
-    });
-
-    describe('methods', function() {
-        var cfg;
-        beforeEach(function() {
-            cfg = new ConfigParser(xml);
-        });
-
-        describe('package name / id', function() {
-            it('should get the (default) packagename', function() {
-                expect(cfg.packageName()).toEqual('io.cordova.hellocordova');
-            });
-            it('should allow setting the packagename', function() {
-                cfg.setPackageName('this.is.bat.country');
-                expect(cfg.packageName()).toEqual('this.is.bat.country');
-            });
-        });
-
-        describe('version', function() {
-            it('should get the version', function() {
-                expect(cfg.version()).toEqual('0.0.1');
-            });
-            it('should allow setting the version', function() {
-                cfg.setVersion('2.0.1');
-                expect(cfg.version()).toEqual('2.0.1');
-            });
-        });
-
-        describe('app name', function() {
-            it('should get the (default) app name', function() {
-                expect(cfg.name()).toEqual('Hello Cordova');
-            });
-            it('should allow setting the app name', function() {
-                cfg.setName('this.is.bat.country');
-                expect(cfg.name()).toEqual('this.is.bat.country');
-            });
-        });
-        describe('preference', function() {
-            it('should get value of existing preference', function() {
-                expect(cfg.getPreference('fullscreen')).toEqual('true');
-            });
-            it('should get undefined as non existing preference', function() {
-                expect(cfg.getPreference('zimzooo!')).toEqual(undefined);
-            });
-        });
-        describe('feature',function(){
-            it('should allow adding a new feature', function(){
-                cfg.addFeature('myfeature');
-                var features = cfg.doc.findall('feature');
-                expect(features[0].attrib.name).toEqual('myfeature');
-            });
-            it('should allow adding features with params', function(){
-                cfg.addFeature('afeature', JSON.parse('[{"name":"paraname", 
"value":"paravalue"}]'));
-                var features = cfg.doc.findall('feature');
-                expect(features[0].attrib.name).toEqual('afeature');
-                var params = features[0].findall('param');
-                expect(params[0].attrib.name).toEqual('paraname');
-                expect(params[0].attrib.value).toEqual('paravalue');
-            });
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/create.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/create.spec.js 
b/cordova-lib/spec-cordova/create.spec.js
index 11986f8..7222e18 100644
--- a/cordova-lib/spec-cordova/create.spec.js
+++ b/cordova-lib/spec-cordova/create.spec.js
@@ -25,7 +25,7 @@ var helpers = require('./helpers'),
     config = require('../src/cordova/config'),
     events = require('../src/cordova/events'),
     util = require('../src/cordova/util'),
-    ConfigParser = require('../src/cordova/ConfigParser'),
+    ConfigParser = require('../src/configparser/ConfigParser'),
     cordova = require('../src/cordova/cordova');
 
 // A utility function to generate all combinations of elements from 2 arrays.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/metadata/android_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/android_parser.spec.js 
b/cordova-lib/spec-cordova/metadata/android_parser.spec.js
index 33176de..336d431 100644
--- a/cordova-lib/spec-cordova/metadata/android_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/android_parser.spec.js
@@ -25,7 +25,7 @@ var platforms = require('../../src/cordova/platforms'),
     xmlHelpers = require('../../src/util/xml-helpers'),
     Q = require('q'),
     config = require('../../src/cordova/config'),
-    ConfigParser = require('../../src/cordova/ConfigParser'),
+    ConfigParser = require('../../src/configparser/ConfigParser'),
     cordova = require('../../src/cordova/cordova');
 
 // Create a real config object before mocking out everything.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js 
b/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
index 37a0f34..9c43e59 100644
--- a/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/blackberry_parser.spec.js
@@ -27,7 +27,7 @@ var platforms = require('../../src/cordova/platforms'),
     Q = require('q'),
     child_process = require('child_process'),
     config = require('../../src/cordova/config'),
-    ConfigParser = require('../../src/cordova/ConfigParser'),
+    ConfigParser = require('../../src/configparser/ConfigParser'),
     cordova = require('../../src/cordova/cordova');
 
 var cfg = new ConfigParser(path.join(__dirname, '..', 'test-config.xml'));

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/metadata/firefoxos_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/firefoxos_parser.spec.js 
b/cordova-lib/spec-cordova/metadata/firefoxos_parser.spec.js
index d1fecbc..3b1faa3 100644
--- a/cordova-lib/spec-cordova/metadata/firefoxos_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/firefoxos_parser.spec.js
@@ -22,7 +22,7 @@ var platforms = require('../../src/cordova/platforms'),
     shell = require('shelljs'),
     fs = require('fs'),
     config = require('../../src/cordova/config'),
-    ConfigParser = require('../../src/cordova/ConfigParser'),
+    ConfigParser = require('../../src/configparser/ConfigParser'),
     cordova = require('../../src/cordova/cordova');
 
 var cfg = new ConfigParser(path.join(__dirname, '..', 'test-config.xml'));

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/ios_parser.spec.js 
b/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
index 11a9b42..7cceb98 100644
--- a/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
@@ -26,7 +26,7 @@ var platforms = require('../../src/cordova/platforms'),
     fs = require('fs'),
     Q = require('q'),
     config = require('../../src/cordova/config'),
-    ConfigParser = require('../../src/cordova/ConfigParser'),
+    ConfigParser = require('../../src/configparser/ConfigParser'),
     cordova = require('../../src/cordova/cordova');
 
 // Create a real config object before mocking out everything.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js 
b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
index c77c32c..cb5504a 100644
--- a/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/windows8_parser.spec.js
@@ -27,7 +27,7 @@ var platforms = require('../../src/cordova/platforms'),
     Q = require('q'),
     fs = require('fs'),
     config = require('../../src/cordova/config'),
-    ConfigParser = require('../../src/cordova/ConfigParser'),
+    ConfigParser = require('../../src/configparser/ConfigParser'),
     cordova = require('../../src/cordova/cordova');
 
 // Create a real config object before mocking out everything.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js 
b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
index 9c2ddd2..84e8777 100644
--- a/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/wp8_parser.spec.js
@@ -27,7 +27,7 @@ var platforms = require('../../src/cordova/platforms'),
     Q = require('q'),
     child_process = require('child_process'),
     config = require('../../src/cordova/config'),
-    ConfigParser = require('../../src/cordova/ConfigParser'),
+    ConfigParser = require('../../src/configparser/ConfigParser'),
     CordovaError = require('../../src/CordovaError'),
     cordova = require('../../src/cordova/cordova');
 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/prepare.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/prepare.spec.js 
b/cordova-lib/spec-cordova/prepare.spec.js
index 18aff59..4842d44 100644
--- a/cordova-lib/spec-cordova/prepare.spec.js
+++ b/cordova-lib/spec-cordova/prepare.spec.js
@@ -24,7 +24,7 @@ var cordova = require('../src/cordova/cordova'),
     util = require('../src/cordova/util'),
     prepare = require('../src/cordova/prepare'),
     lazy_load = require('../src/cordova/lazy_load'),
-    ConfigParser = require('../src/cordova/ConfigParser'),
+    ConfigParser = require('../src/configparser/ConfigParser'),
     platforms = require('../src/cordova/platforms'),
     hooker = require('../src/cordova/hooker'),
     xmlHelpers = require('../src/util/xml-helpers'),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/restore.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/restore.spec.js 
b/cordova-lib/spec-cordova/restore.spec.js
index d32784e..1604d5d 100644
--- a/cordova-lib/spec-cordova/restore.spec.js
+++ b/cordova-lib/spec-cordova/restore.spec.js
@@ -21,7 +21,7 @@ var project_dir = path.join(__dirname, 'fixtures', 'base');
 
 var cordova = require('../src/cordova/cordova'),
     cordova_util = require('../src/cordova/util'),
-    ConfigParser = require('../src/cordova/ConfigParser');
+    ConfigParser = require('../src/configparser/ConfigParser');
 
 describe('restore command', function(){
   var is_cordova, result, config_add_feature, cd_project;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/spec-cordova/save.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/save.spec.js 
b/cordova-lib/spec-cordova/save.spec.js
index 6c76dd9..2386c43 100644
--- a/cordova-lib/spec-cordova/save.spec.js
+++ b/cordova-lib/spec-cordova/save.spec.js
@@ -21,7 +21,7 @@ var project_dir = path.join(__dirname, 'fixtures', 'base');
 
 var cordova = require('../src/cordova/cordova'),
     cordova_util = require('../src/cordova/util'),
-    ConfigParser = require('../src/cordova/ConfigParser');
+    ConfigParser = require('../src/configparser/ConfigParser');
 
 describe('save command', function(){
   var is_cordova, result, config_add_feature, cd_project;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/configparser/ConfigParser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/configparser/ConfigParser.js 
b/cordova-lib/src/configparser/ConfigParser.js
new file mode 100644
index 0000000..2df38d3
--- /dev/null
+++ b/cordova-lib/src/configparser/ConfigParser.js
@@ -0,0 +1,179 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+var et = require('elementtree'),
+    xml= require('../util/xml-helpers'),
+    CordovaError = require('../CordovaError'),
+    fs = require('fs');
+
+/** Wraps a config.xml file */
+function ConfigParser(path) {
+    this.path = path;
+    try {
+        this.doc = xml.parseElementtreeSync(path);
+    } catch (e) {
+        console.error('Parsing '+path+' failed');
+        throw e;
+    }
+    var r = this.doc.getroot();
+    if (r.tag !== 'widget') {
+        throw new CordovaError(path + ' has incorrect root node name (expected 
"widget", was "' + r.tag + '")');
+    }
+}
+
+function getNodeTextSafe(el) {
+    return el && el.text && el.text.trim();
+}
+
+function findOrCreate(doc, name) {
+    var ret = doc.find(name);
+    if (!ret) {
+        ret = new et.Element(name);
+        doc.getroot().append(content);
+    }
+    return ret;
+}
+
+ConfigParser.prototype = {
+    packageName: function(id) {
+        return this.doc.getroot().attrib['id'];
+    },
+    setPackageName: function(id) {
+        this.doc.getroot().attrib['id'] = id;
+    },
+    name: function() {
+        return getNodeTextSafe(this.doc.find('name'));
+    },
+    setName: function(name) {
+        var el = findOrCreate(this.doc, 'name');
+        el.text = name;
+    },
+    description: function() {
+        return this.doc.find('description').text.trim();
+    },
+    setDescription: function(text) {
+        this.doc.find('description').text = text;
+        var el = findOrCreate(this.doc, 'description');
+    },
+    version: function() {
+        return this.doc.getroot().attrib['version'];
+    },
+    android_versionCode: function() {
+        return this.doc.getroot().attrib['android-versionCode'];
+    },
+    ios_CFBundleVersion: function() {
+        return this.doc.getroot().attrib['ios-CFBundleVersion'];
+    },
+    setVersion: function(value) {
+        this.doc.getroot().attrib['version'] = value;
+    },
+    author: function() {
+        return getNodeTextSafe(this.doc.find('author'));
+    },
+    getPreference: function(name) {
+        var preferences = this.doc.findall('preference');
+        var ret = null;
+        preferences.forEach(function (preference) {
+            // Take the last one that matches.
+            if (preference.attrib.name.toLowerCase() === name.toLowerCase()) {
+                ret = preference.attrib.value;
+            }
+        });
+        return ret;
+    },
+    /**
+     * Returns all icons for the platform specified.
+     * @param  {String} platform The platform.
+     * @return {Array} Icons for the platform specified.
+     */
+    getIcons: function(platform) {
+        var ret = [];
+            iconElements = [];
+
+        if (platform) { // platform specific icons
+            this.doc.findall('platform[@name=\'' + platform + 
'\']/icon').forEach(function(elt){
+                elt.platform = platform; // mark as platform specific icon
+                iconElements.push(elt)
+            });
+        }
+        // root level icons
+        iconElements = iconElements.concat(this.doc.findall('icon'));
+        // parse icon elements
+        iconElements.forEach(function (elt) {
+            var icon = {};
+            icon.src = elt.attrib.src;
+            icon.density = elt.attrib['density'] || elt.attrib['cdv:density'] 
|| elt.attrib['gap:density'];
+            icon.platform = elt.platform || null; // null means icon 
represents default icon (shared between platforms)
+            icon.width = elt.attrib.width;
+            icon.height = elt.attrib.height;
+            // If one of width or Height is undefined, assume they are equal.
+            icon.width = icon.width || icon.height;
+            icon.height = icon.height || icon.width;
+
+            // default icon
+            if (!icon.width && !icon.height && !icon.density) {
+                ret.defaultIcon = icon;
+            }
+            ret.push(icon);
+        });
+
+        /**
+         * Returns icon with specified width and height
+         * @param  {number} w  Width of icon
+         * @param  {number} h  Height of icon
+         * @return {Icon}      Icon object or null if not found
+         */
+        ret.getIconBySize = function(w, h){
+            // If only one of width and height is given
+            // then we assume that they are equal.
+            var width = w || h, height = h || w;
+            for (var idx in this) {
+                var icon = this[idx];
+                if (width == icon.width && height == icon.width) return icon;
+            }
+            return null;
+        };
+        /** Returns default icons */
+        ret.getDefault = function() {
+            return ret.defaultIcon;
+        }
+
+        return ret;
+    },
+    /**
+     *This does not check for duplicate feature entries
+     */
+    addFeature: function (name, params){
+      var el = new et.Element('feature');
+        el.attrib.name = name;
+        if(params){
+          params.forEach(function(param){
+            var p = new et.Element('param');
+            p.attrib.name = param.name;
+            p.attrib.value = param.value;
+            el.append(p);
+          });
+        }
+        this.doc.getroot().append(el);
+    },
+    write:function() {
+        fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8');
+    }
+};
+
+module.exports = ConfigParser;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/configparser/ConfigParser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/configparser/ConfigParser.spec.js 
b/cordova-lib/src/configparser/ConfigParser.spec.js
new file mode 100644
index 0000000..a1ba102
--- /dev/null
+++ b/cordova-lib/src/configparser/ConfigParser.spec.js
@@ -0,0 +1,99 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+var path = require('path'),
+    fs = require('fs'),
+    ConfigParser = require('../src/cordova/ConfigParser'),
+    xml = path.join(__dirname, 'test-config.xml'),
+    xml_contents = fs.readFileSync(xml, 'utf-8');
+
+describe('config.xml parser', function () {
+    var readFile;
+    beforeEach(function() {
+        readFile = spyOn(fs, 'readFileSync').andReturn(xml_contents);
+    });
+
+    it('should create an instance based on an xml file', function() {
+        var cfg;
+        expect(function () {
+            cfg = new ConfigParser(xml);
+        }).not.toThrow();
+        expect(cfg).toBeDefined();
+        expect(cfg.doc).toBeDefined();
+    });
+
+    describe('methods', function() {
+        var cfg;
+        beforeEach(function() {
+            cfg = new ConfigParser(xml);
+        });
+
+        describe('package name / id', function() {
+            it('should get the (default) packagename', function() {
+                expect(cfg.packageName()).toEqual('io.cordova.hellocordova');
+            });
+            it('should allow setting the packagename', function() {
+                cfg.setPackageName('this.is.bat.country');
+                expect(cfg.packageName()).toEqual('this.is.bat.country');
+            });
+        });
+
+        describe('version', function() {
+            it('should get the version', function() {
+                expect(cfg.version()).toEqual('0.0.1');
+            });
+            it('should allow setting the version', function() {
+                cfg.setVersion('2.0.1');
+                expect(cfg.version()).toEqual('2.0.1');
+            });
+        });
+
+        describe('app name', function() {
+            it('should get the (default) app name', function() {
+                expect(cfg.name()).toEqual('Hello Cordova');
+            });
+            it('should allow setting the app name', function() {
+                cfg.setName('this.is.bat.country');
+                expect(cfg.name()).toEqual('this.is.bat.country');
+            });
+        });
+        describe('preference', function() {
+            it('should get value of existing preference', function() {
+                expect(cfg.getPreference('fullscreen')).toEqual('true');
+            });
+            it('should get undefined as non existing preference', function() {
+                expect(cfg.getPreference('zimzooo!')).toEqual(undefined);
+            });
+        });
+        describe('feature',function(){
+            it('should allow adding a new feature', function(){
+                cfg.addFeature('myfeature');
+                var features = cfg.doc.findall('feature');
+                expect(features[0].attrib.name).toEqual('myfeature');
+            });
+            it('should allow adding features with params', function(){
+                cfg.addFeature('afeature', JSON.parse('[{"name":"paraname", 
"value":"paravalue"}]'));
+                var features = cfg.doc.findall('feature');
+                expect(features[0].attrib.name).toEqual('afeature');
+                var params = features[0].findall('param');
+                expect(params[0].attrib.name).toEqual('paraname');
+                expect(params[0].attrib.value).toEqual('paravalue');
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/configparser/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/src/configparser/README.md 
b/cordova-lib/src/configparser/README.md
new file mode 100644
index 0000000..e5cd1bf
--- /dev/null
+++ b/cordova-lib/src/configparser/README.md
@@ -0,0 +1,86 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+
+# Cordova-Lib
+
+## ConfigParser
+
+wraps a valid cordova config.xml file 
+
+### Usage
+
+### Include the ConfigParser module in a projet
+
+    var ConfigParser = require('cordova-lib').configparser;
+
+### Create a new ConfigParser
+
+    var config = new ConfigParser('path/to/config/xml/');
+    
+### Utility Functions
+
+#### packageName(id)
+returns document root 'id' attribute value
+#### Usage
+
+    config.packageName: function(id) 
+
+/*
+ * sets document root element 'id' attribute to @id
+ *
+ * @id - new id value
+ *
+ */
+#### setPackageName(id)
+set document root 'id' attribute to 
+ function(id) {
+        this.doc.getroot().attrib['id'] = id;
+    },
+
+### 
+    name: function() {
+        return getNodeTextSafe(this.doc.find('name'));
+    },
+    setName: function(name) {
+        var el = findOrCreate(this.doc, 'name');
+        el.text = name;
+    },
+
+### read the description element
+    
+    config.description()
+
+    var text = "New and improved description of App"
+    setDescription(text)
+    
+### version management
+    version()
+    android_versionCode()
+    ios_CFBundleVersion()
+    setVersion()
+    
+### read author element
+
+   config.author();
+
+### read preference
+
+    config.getPreference(name);

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/ConfigParser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/ConfigParser.js 
b/cordova-lib/src/cordova/ConfigParser.js
deleted file mode 100644
index 2df38d3..0000000
--- a/cordova-lib/src/cordova/ConfigParser.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-*/
-var et = require('elementtree'),
-    xml= require('../util/xml-helpers'),
-    CordovaError = require('../CordovaError'),
-    fs = require('fs');
-
-/** Wraps a config.xml file */
-function ConfigParser(path) {
-    this.path = path;
-    try {
-        this.doc = xml.parseElementtreeSync(path);
-    } catch (e) {
-        console.error('Parsing '+path+' failed');
-        throw e;
-    }
-    var r = this.doc.getroot();
-    if (r.tag !== 'widget') {
-        throw new CordovaError(path + ' has incorrect root node name (expected 
"widget", was "' + r.tag + '")');
-    }
-}
-
-function getNodeTextSafe(el) {
-    return el && el.text && el.text.trim();
-}
-
-function findOrCreate(doc, name) {
-    var ret = doc.find(name);
-    if (!ret) {
-        ret = new et.Element(name);
-        doc.getroot().append(content);
-    }
-    return ret;
-}
-
-ConfigParser.prototype = {
-    packageName: function(id) {
-        return this.doc.getroot().attrib['id'];
-    },
-    setPackageName: function(id) {
-        this.doc.getroot().attrib['id'] = id;
-    },
-    name: function() {
-        return getNodeTextSafe(this.doc.find('name'));
-    },
-    setName: function(name) {
-        var el = findOrCreate(this.doc, 'name');
-        el.text = name;
-    },
-    description: function() {
-        return this.doc.find('description').text.trim();
-    },
-    setDescription: function(text) {
-        this.doc.find('description').text = text;
-        var el = findOrCreate(this.doc, 'description');
-    },
-    version: function() {
-        return this.doc.getroot().attrib['version'];
-    },
-    android_versionCode: function() {
-        return this.doc.getroot().attrib['android-versionCode'];
-    },
-    ios_CFBundleVersion: function() {
-        return this.doc.getroot().attrib['ios-CFBundleVersion'];
-    },
-    setVersion: function(value) {
-        this.doc.getroot().attrib['version'] = value;
-    },
-    author: function() {
-        return getNodeTextSafe(this.doc.find('author'));
-    },
-    getPreference: function(name) {
-        var preferences = this.doc.findall('preference');
-        var ret = null;
-        preferences.forEach(function (preference) {
-            // Take the last one that matches.
-            if (preference.attrib.name.toLowerCase() === name.toLowerCase()) {
-                ret = preference.attrib.value;
-            }
-        });
-        return ret;
-    },
-    /**
-     * Returns all icons for the platform specified.
-     * @param  {String} platform The platform.
-     * @return {Array} Icons for the platform specified.
-     */
-    getIcons: function(platform) {
-        var ret = [];
-            iconElements = [];
-
-        if (platform) { // platform specific icons
-            this.doc.findall('platform[@name=\'' + platform + 
'\']/icon').forEach(function(elt){
-                elt.platform = platform; // mark as platform specific icon
-                iconElements.push(elt)
-            });
-        }
-        // root level icons
-        iconElements = iconElements.concat(this.doc.findall('icon'));
-        // parse icon elements
-        iconElements.forEach(function (elt) {
-            var icon = {};
-            icon.src = elt.attrib.src;
-            icon.density = elt.attrib['density'] || elt.attrib['cdv:density'] 
|| elt.attrib['gap:density'];
-            icon.platform = elt.platform || null; // null means icon 
represents default icon (shared between platforms)
-            icon.width = elt.attrib.width;
-            icon.height = elt.attrib.height;
-            // If one of width or Height is undefined, assume they are equal.
-            icon.width = icon.width || icon.height;
-            icon.height = icon.height || icon.width;
-
-            // default icon
-            if (!icon.width && !icon.height && !icon.density) {
-                ret.defaultIcon = icon;
-            }
-            ret.push(icon);
-        });
-
-        /**
-         * Returns icon with specified width and height
-         * @param  {number} w  Width of icon
-         * @param  {number} h  Height of icon
-         * @return {Icon}      Icon object or null if not found
-         */
-        ret.getIconBySize = function(w, h){
-            // If only one of width and height is given
-            // then we assume that they are equal.
-            var width = w || h, height = h || w;
-            for (var idx in this) {
-                var icon = this[idx];
-                if (width == icon.width && height == icon.width) return icon;
-            }
-            return null;
-        };
-        /** Returns default icons */
-        ret.getDefault = function() {
-            return ret.defaultIcon;
-        }
-
-        return ret;
-    },
-    /**
-     *This does not check for duplicate feature entries
-     */
-    addFeature: function (name, params){
-      var el = new et.Element('feature');
-        el.attrib.name = name;
-        if(params){
-          params.forEach(function(param){
-            var p = new et.Element('param');
-            p.attrib.name = param.name;
-            p.attrib.value = param.value;
-            el.append(p);
-          });
-        }
-        this.doc.getroot().append(el);
-    },
-    write:function() {
-        fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8');
-    }
-};
-
-module.exports = ConfigParser;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/create.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/create.js 
b/cordova-lib/src/cordova/create.js
index 49e9ed2..54debe7 100644
--- a/cordova-lib/src/cordova/create.js
+++ b/cordova-lib/src/cordova/create.js
@@ -26,7 +26,7 @@ var path          = require('path'),
     lazy_load     = require('./lazy_load'),
     Q             = require('q'),
     CordovaError  = require('../CordovaError'),
-    ConfigParser = require('./ConfigParser'),
+    ConfigParser = require('../configparser/ConfigParser'),
     cordova_util  = require('./util');
 
 var DEFAULT_NAME = "HelloCordova",

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js 
b/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
index f6e16d3..16c2f26 100644
--- a/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
+++ b/cordova-lib/src/cordova/metadata/amazon_fireos_parser.js
@@ -24,7 +24,7 @@ var fs            = require('fs'),
     shell         = require('shelljs'),
     project_config= require('../config'),
     Q             = require('q'),
-    ConfigParser = require('../ConfigParser'),
+    ConfigParser = require('../../configparser/ConfigParser'),
     CordovaError = require('../../CordovaError');
 
 var default_prefs = {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/android_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/android_parser.js 
b/cordova-lib/src/cordova/metadata/android_parser.js
index 8a0020b..fd0c498 100644
--- a/cordova-lib/src/cordova/metadata/android_parser.js
+++ b/cordova-lib/src/cordova/metadata/android_parser.js
@@ -24,7 +24,7 @@ var fs            = require('fs'),
     shell         = require('shelljs'),
     project_config= require('../config'),
     Q             = require('q'),
-    ConfigParser  = require('../ConfigParser'),
+    ConfigParser  = require('../../configparser/ConfigParser'),
     CordovaError  = require('../../CordovaError');
 
 var default_prefs = {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/blackberry10_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/blackberry10_parser.js 
b/cordova-lib/src/cordova/metadata/blackberry10_parser.js
index b9e3b93..dca1da3 100644
--- a/cordova-lib/src/cordova/metadata/blackberry10_parser.js
+++ b/cordova-lib/src/cordova/metadata/blackberry10_parser.js
@@ -22,7 +22,7 @@ var fs            = require('fs'),
     util          = require('../util'),
     Q             = require('q'),
     child_process = require('child_process'),
-    ConfigParser  = require('../ConfigParser'),
+    ConfigParser  = require('../../configparser/ConfigParser'),
     CordovaError  = require('../../CordovaError'),
     events        = require('../events'),
     config        = require('../config');

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/firefoxos_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/firefoxos_parser.js 
b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
index becef96..38797f7 100644
--- a/cordova-lib/src/cordova/metadata/firefoxos_parser.js
+++ b/cordova-lib/src/cordova/metadata/firefoxos_parser.js
@@ -23,7 +23,7 @@ var fs = require('fs'),
     util = require('../util'),
     events = require('../events'),
     Q = require('q'),
-    ConfigParser = require('../ConfigParser');
+    ConfigParser = require('../../configparser/ConfigParser');
 
 module.exports = function firefoxos_parser(project) {
     this.path = project;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js 
b/cordova-lib/src/cordova/metadata/ios_parser.js
index c837771..ce6ccc8 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -25,7 +25,7 @@ var fs            = require('fs'),
     shell         = require('shelljs'),
     plist         = require('plist-with-patches'),
     Q             = require('q'),
-    ConfigParser  = require('../ConfigParser'),
+    ConfigParser  = require('../../configparser/ConfigParser'),
     CordovaError  = require('../../CordovaError'),
     config        = require('../config');
 

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/ubuntu_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ubuntu_parser.js 
b/cordova-lib/src/cordova/metadata/ubuntu_parser.js
index 4abc338..c1e1221 100644
--- a/cordova-lib/src/cordova/metadata/ubuntu_parser.js
+++ b/cordova-lib/src/cordova/metadata/ubuntu_parser.js
@@ -27,7 +27,7 @@ var fs            = require('fs'),
     project_config= require('../config'),
     Q             = require('q'),
     os            = require('os'),
-    ConfigParser  = require('../ConfigParser'),
+    ConfigParser  = require('../../configparser/ConfigParser'),
     CordovaError  = require('../../CordovaError');
 
 module.exports = function(project) {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/windows8_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/windows8_parser.js 
b/cordova-lib/src/cordova/metadata/windows8_parser.js
index ccf1f0e..074d2a4 100644
--- a/cordova-lib/src/cordova/metadata/windows8_parser.js
+++ b/cordova-lib/src/cordova/metadata/windows8_parser.js
@@ -25,7 +25,7 @@ var fs            = require('fs'),
     events        = require('../events'),
     Q             = require('q'),
     child_process = require('child_process'),
-    ConfigParser  = require('../ConfigParser'),
+    ConfigParser  = require('../../configparser/ConfigParser'),
     CordovaError  = require('../../CordovaError'),
     xml           = require('../../util/xml-helpers'),
     config        = require('../config'),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/metadata/wp8_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/wp8_parser.js 
b/cordova-lib/src/cordova/metadata/wp8_parser.js
index 6e04df9..c847fc6 100644
--- a/cordova-lib/src/cordova/metadata/wp8_parser.js
+++ b/cordova-lib/src/cordova/metadata/wp8_parser.js
@@ -24,7 +24,7 @@ var fs            = require('fs'),
     shell         = require('shelljs'),
     child_process = require('child_process'),
     Q             = require('q'),
-    ConfigParser  = require('../ConfigParser'),
+    ConfigParser  = require('../../configparser/ConfigParser'),
     CordovaError  = require('../../CordovaError'),
     xml           = require('../../util/xml-helpers'),
     config        = require('../config'),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js 
b/cordova-lib/src/cordova/platform.js
index e29612c..bec2a81 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -22,7 +22,7 @@
 var config            = require('./config'),
     cordova           = require('./cordova'),
     cordova_util      = require('./util'),
-    ConfigParser      = require('./ConfigParser'),
+    ConfigParser      = require('../configparser/ConfigParser'),
     util              = require('util'),
     fs                = require('fs'),
     os                = require('os'),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/plugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/plugin.js 
b/cordova-lib/src/cordova/plugin.js
index 979d466..ae0fc10 100644
--- a/cordova-lib/src/cordova/plugin.js
+++ b/cordova-lib/src/cordova/plugin.js
@@ -26,7 +26,7 @@ var cordova_util  = require('./util'),
     config        = require('./config'),
     Q             = require('q'),
     CordovaError  = require('../CordovaError'),
-    ConfigParser  = require('./ConfigParser'),
+    ConfigParser  = require('../configparser/ConfigParser'),
     fs            = require('fs'),
     PluginInfo    = require('../PluginInfo'),
     events        = require('./events');

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/prepare.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/prepare.js 
b/cordova-lib/src/cordova/prepare.js
index fbdaa37..9727e46 100644
--- a/cordova-lib/src/cordova/prepare.js
+++ b/cordova-lib/src/cordova/prepare.js
@@ -17,7 +17,7 @@
     under the License.
 */
 var cordova_util      = require('./util'),
-    ConfigParser = require('./ConfigParser'),
+    ConfigParser      = require('../configparser/ConfigParser'),
     path              = require('path'),
     platforms         = require('./platforms'),
     platform          = require('./platform'),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/restore.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/restore.js 
b/cordova-lib/src/cordova/restore.js
index 7ed97f0..196967a 100644
--- a/cordova-lib/src/cordova/restore.js
+++ b/cordova-lib/src/cordova/restore.js
@@ -18,7 +18,7 @@
 */
 
 var cordova_util    = require('./util'),
-    ConfigParser     = require('./ConfigParser'),
+    ConfigParser     = require('../configparser/ConfigParser'),
     path             = require('path'),
     xml              = require('../util/xml-helpers')
     Q                = require('q'),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/save.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/save.js b/cordova-lib/src/cordova/save.js
index 15b0074..4cdcac8 100644
--- a/cordova-lib/src/cordova/save.js
+++ b/cordova-lib/src/cordova/save.js
@@ -18,7 +18,7 @@
 */
 
 var cordova_util    = require('./util'),
-    ConfigParser     = require('./ConfigParser'),
+    ConfigParser     = require('../configparser/ConfigParser'),
     path             = require('path'),
     xml              = require('../util/xml-helpers')
     Q                = require('q'),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/cordova-lib/src/cordova/serve.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/serve.js b/cordova-lib/src/cordova/serve.js
index 4915529..8a4eb5c 100644
--- a/cordova-lib/src/cordova/serve.js
+++ b/cordova-lib/src/cordova/serve.js
@@ -21,7 +21,7 @@ var cordova_util = require('./util'),
     path = require('path'),
     shell = require('shelljs'),
     platforms     = require('./platforms'),
-    ConfigParser = require('./ConfigParser'),
+    ConfigParser = require('../configserver/ConfigParser'),
     hooker        = require('./hooker'),
     fs = require('fs'),
     http = require("http"),

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3623a84e/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..de6caf8
--- /dev/null
+++ b/package.json
@@ -0,0 +1,162 @@
+{
+  "author": "Apache Software Foundation",
+  "name": "cordova-lib",
+  "description": "Apache Cordova tools core lib and API",
+  "version": "0.21.4-dev",
+  "repository": {
+    "type": "git",
+    "url": "git://git-wip-us.apache.org/repos/asf/cordova-lib.git"
+  },
+  "bugs": {
+    "url": "https://issues.apache.org/jira/browse/CB";,
+    "email": "[email protected]"
+  },
+  "main": "cordova-lib/cordova-lib.js",
+  "engines": {
+    "node": ">=0.9.9"
+  },
+  "engineStrict": true,
+  "dependencies": {
+    "bplist-parser": "0.0.x",
+    "dep-graph": "1.1.0",
+    "elementtree": "0.1.5",
+    "glob": "3.2.x",
+    "mime": "~1.2.11",
+    "npm": "1.3.4",
+    "npmconf": "0.1.x",
+    "osenv": "0.0.x",
+    "plist-with-patches": "0.5.x",
+    "properties-parser": "~0.2.2",
+    "q": "~0.9",
+    "rc": "0.3.0",
+    "request": "2.22.0",
+    "semver": "2.0.x",
+    "shelljs": "0.1.x",
+    "tar": "0.1.x",
+    "underscore": "1.4.4",
+    "xcode": "0.6.6"
+  },
+  "devDependencies": {
+    "temp": "0.6.x",
+    "jasmine-node": "~1"
+  },
+  "scripts": {
+    "test": "jasmine-node --color spec-plugman spec-cordova"
+  },
+  "contributors": [
+    {
+      "name": "Brian LeRoux",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Fil Maj",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Mike Reinstein",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Darry Pogue",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Michael Brooks",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Braden Shepherdson",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Gord Tanner",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Tim Kim",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Benn Mapes",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Michael Wolf",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Andrew Grieve",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Bryan Higgins",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Don Coleman",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Germano Gabbianelli",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Ian Clelland",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Lucas Holmqust",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Matt LeGrand",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Michal Mocny",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Sam Breed",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Tommy-Carlos Williams",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Rubén Norte",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Germano Gabbianelli",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Steven Gill",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Jesse",
+      "email": "[email protected]"
+    },
+    {
+      "name": "Anis Kadri"
+    },
+    {
+      "name": "Ryan Willoughby"
+    },
+    {
+      "name": "Brett Rudd"
+    },
+    {
+      "name": "Shazron Abdullah"
+    },
+    {
+      "name": "Steve Gill"
+    },
+    {
+      "name": "Jesse MacFadyen"
+    }
+  ]
+}

Reply via email to