Merge pull request #335 from apache/janpio-fix_description

Fix wrong (default) description content being written to project files
diff --git a/template/cordova/defaults.xml b/template/cordova/defaults.xml
new file mode 100644
index 0000000..6bcbc1d
--- /dev/null
+++ b/template/cordova/defaults.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#
+# 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.
+#
+-->
+<widget xmlns     = "http://www.w3.org/ns/widgets"
+        id        = "io.cordova.helloCordova"
+        version   = "2.0.0">
+
+</widget>
diff --git a/template/cordova/lib/prepare.js b/template/cordova/lib/prepare.js
index d7024a0..f09d08e 100644
--- a/template/cordova/lib/prepare.js
+++ b/template/cordova/lib/prepare.js
@@ -705,10 +705,11 @@
  *   configuration is already dumped to appropriate config.xml file.
  */
 function updateConfigFilesFrom (sourceConfig, configMunger, locations) {
-    // First cleanup current config and merge project's one into own
     var defaultConfig = locations.defaultConfigXml;
     var ownConfig = locations.configXml;
     var sourceCfg = sourceConfig.path;
+
+    // First cleanup current config and merge project's one into own
     // If defaults.xml is present, overwrite platform config.xml with it.
     // Otherwise save whatever is there as defaults so it can be
     // restored or copy project config into platform if none exists.