You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/05/16 19:28:25 UTC

git commit: adding indent to config files

Updated Branches:
  refs/heads/master 0365cbf81 -> b562e691c


adding indent to config files


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

Branch: refs/heads/master
Commit: b562e691c95768d018477ed42ca7b354825d2455
Parents: 0365cbf
Author: Brett Rudd <br...@gmail.com>
Authored: Thu May 9 12:15:14 2013 -0700
Committer: Fil Maj <ma...@gmail.com>
Committed: Thu May 16 10:27:54 2013 -0700

----------------------------------------------------------------------
 src/util/config-changes.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b562e691/src/util/config-changes.js
----------------------------------------------------------------------
diff --git a/src/util/config-changes.js b/src/util/config-changes.js
index 5276184..a81e56d 100644
--- a/src/util/config-changes.js
+++ b/src/util/config-changes.js
@@ -183,7 +183,7 @@ module.exports = {
                                                 var doc = new et.ElementTree(et.XML(fs.readFileSync(filepath, 'utf-8')));
                                                 if (xml_helpers.pruneXML(doc, xml_to_prune, selector)) {
                                                     // were good, write out the file!
-                                                    fs.writeFileSync(filepath, doc.write(), 'utf-8');
+                                                    fs.writeFileSync(filepath, doc.write({indent: 4}), 'utf-8');
                                                 } else {
                                                     // uh oh
                                                     throw new Error('pruning xml at selector "' + selector + '" from "' + filepath + '" during config uninstall went bad :(');
@@ -273,7 +273,7 @@ module.exports = {
                                         var doc = new et.ElementTree(et.XML(fs.readFileSync(filepath, 'utf-8')));
                                         if (xml_helpers.graftXML(doc, xml_to_graft, selector)) {
                                             // were good, write out the file!
-                                            fs.writeFileSync(filepath, doc.write(), 'utf-8');
+                                            fs.writeFileSync(filepath, doc.write({indent: 4}), 'utf-8');
                                         } else {
                                             // uh oh
                                             throw new Error('grafting xml at selector "' + selector + '" from "' + filepath + '" during config install went bad :(');