You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/05/24 01:32:11 UTC
git commit: [CB-3495] clean project after creating
Updated Branches:
refs/heads/2.8.x b638ca69d -> c8a6311de
[CB-3495] clean project after creating
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/c8a6311d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/c8a6311d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/c8a6311d
Branch: refs/heads/2.8.x
Commit: c8a6311de193bfa7b8796bbe6111d122c5197cbb
Parents: b638ca6
Author: Benn Mapes <be...@gmail.com>
Authored: Thu May 23 16:31:24 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Thu May 23 16:31:24 2013 -0700
----------------------------------------------------------------------
bin/create.js | 3 +++
templates/standalone/cordova/lib/clean.js | 18 ++++++++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c8a6311d/bin/create.js
----------------------------------------------------------------------
diff --git a/bin/create.js b/bin/create.js
index d5e7c46..c4c789e 100644
--- a/bin/create.js
+++ b/bin/create.js
@@ -210,6 +210,9 @@ function create(path, namespace, name, guid) {
}
}
+ //clean up any Bin/obj or other generated files
+ exec('cscript ' + path + '\\cordova\\lib\\clean.js //nologo');
+
Log("CREATE SUCCESS : " + path);
// TODO: Name the project according to the arguments
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/c8a6311d/templates/standalone/cordova/lib/clean.js
----------------------------------------------------------------------
diff --git a/templates/standalone/cordova/lib/clean.js b/templates/standalone/cordova/lib/clean.js
index caa1957..b091425 100644
--- a/templates/standalone/cordova/lib/clean.js
+++ b/templates/standalone/cordova/lib/clean.js
@@ -52,14 +52,20 @@ function Log(msg, error) {
function clean_project(path) {
delete_if_exists(path + "\\obj");
delete_if_exists(path + "\\Bin");
- // delete AppName.csproj.user as well? Service References?
- var proj_folder = fso.GetFolder(path);
- var proj_files = new Enumerator(proj_folder.Files);
- for (;!proj_files.atEnd(); proj_files.moveNext()) {
- if (fso.GetExtensionName(proj_files.item()).match(/user/)) {
- fso.DeleteFile(proj_files.item());
+
+ // checks to see if a .csproj file exists in the project root
+ if (fso.FolderExists(path)) {
+ var proj_folder = fso.GetFolder(path);
+ var proj_files = new Enumerator(proj_folder.Files);
+ for (;!proj_files.atEnd(); proj_files.moveNext()) {
+ if (fso.GetExtensionName(proj_files.item()) == 'user') {
+ delete_if_exists(proj_files.item())
+ } else if (fso.GetExtensionName(proj_files.item()) == 'sou') {
+ delete_if_exists(proj_files.item())
+ }
}
}
+ //TODO: delete Service References?
}
// cleans any files generated by build --debug