You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2014/08/14 03:48:21 UTC

[8/9] git commit: cleanup file, remove commented out stuff after testing it

cleanup file, remove commented out stuff after testing it


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

Branch: refs/heads/master
Commit: 4a3639234d217509f59662fa7496cd8dc0df570b
Parents: 7102858
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Aug 13 18:41:27 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Aug 13 18:41:27 2014 -0700

----------------------------------------------------------------------
 wp8/bin/createTemplates.js | 49 ++---------------------------------------
 1 file changed, 2 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/4a363923/wp8/bin/createTemplates.js
----------------------------------------------------------------------
diff --git a/wp8/bin/createTemplates.js b/wp8/bin/createTemplates.js
index 20418ad..d50594b 100644
--- a/wp8/bin/createTemplates.js
+++ b/wp8/bin/createTemplates.js
@@ -157,41 +157,6 @@ function removeCommonScripts() {
     deleteFileIfExists(destPath + "\\check_reqs.js");
 }
 
-function copyCommonItemsToTemplate() {
-    var srcPath = repoRoot + '\\common';
-    var destPath = platformRoot + templatePath;
-
-    var folder = fso.GetFolder(srcPath);
-    // iterate over the files in the folder
-    for (var files = new Enumerator(folder.files) ; !files.atEnd() ; files.moveNext()) {
-        //Log("File: " + srcPath + "\\" +  files.item().name);
-        copyFile(srcPath + "\\" + files.item().name, destPath + "\\" + files.item().name);
-    }
-    // iterate over the child folders in the folder
-    for (var subFlds = new Enumerator(folder.SubFolders) ; !subFlds.atEnd() ; subFlds.moveNext()) {
-        //Log("Folder: " + srcPath + "\\" + subFlds.item().name);
-        exec('%comspec% /c xcopy /Y /E /I ' + srcPath + "\\" + subFlds.item().name + " "
-            + destPath + "\\" + subFlds.item().name);
-    }
-
-    
-}
-
-// delete desination items
-function removeCommonItems() {
-    var srcPath = repoRoot + '\\common';
-    var destPath = platformRoot + templatePath;
-    var folder = fso.GetFolder(srcPath);
-    // iterate over the files in the folder
-    for (var files = new Enumerator(folder.files) ; !files.atEnd() ; files.moveNext()) {
-        deleteFileIfExists(destPath + "\\" + files.item().name);
-    }
-    // iterate over the child folders in the folder
-    for (var subFlds = new Enumerator(folder.SubFolders) ; !subFlds.atEnd() ; subFlds.moveNext()) {
-        deleteFolderIfExists(destPath + "\\" + subFlds.item().name);
-    }
-}
-
 // packages templates into .zip
 function package_templates()
 {
@@ -208,9 +173,6 @@ function package_templates()
 
     deleteFileIfExists(platformRoot + templatePath + "\\CordovaWP8Solution.v11.suo");
 
-    //exec('%comspec% /c xcopy /Y /E /I ' + repoRoot + '\\Plugins ' + platformRoot + templatePath + '\\Plugins');
-
-    //copyCommonItemsToTemplate();
     copyCommonScripts();
 
     copyFile(repoRoot + '\\VERSION',platformRoot + templatePath);
@@ -298,9 +260,9 @@ function package_templates()
         }
     }
 
+    removeCommonScripts();
     deleteFileIfExists(platformRoot + templatePath + '\\config.xml');
-
-    cleanUp();
+    deleteFileIfExists(platformRoot + templatePath + "\\VERSION");
 }
 
 function zip_project(zip_path, project_path) {
@@ -340,13 +302,6 @@ function zip_project(zip_path, project_path) {
     }
 }
 
-// delete any unneeded files when finished
-function cleanUp() {
-    //removeCommonItems();
-    removeCommonScripts();
-    deleteFileIfExists(platformRoot + templatePath + "\\VERSION");
-}
-
 function parseArgs() {
     if(args.Count() > 0) {