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:55:28 UTC
[1/2] git commit: CB-4655 WP8: Default native project template should
be overridable at project creation time
Repository: cordova-wp8
Updated Branches:
refs/heads/master 4914c9865 -> 84b23a505
CB-4655 WP8: Default native project template should be overridable at project creation time
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/11b686b2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/11b686b2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/11b686b2
Branch: refs/heads/master
Commit: 11b686b28dd560248552b8227700d061c493efcc
Parents: 861bb47
Author: sgrebnov <v-...@microsoft.com>
Authored: Mon Jul 21 13:27:49 2014 +0400
Committer: sgrebnov <v-...@microsoft.com>
Committed: Mon Jul 21 13:27:49 2014 +0400
----------------------------------------------------------------------
wp8/bin/create.js | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/11b686b2/wp8/bin/create.js
----------------------------------------------------------------------
diff --git a/wp8/bin/create.js b/wp8/bin/create.js
index 4c8ae7b..d336d97 100644
--- a/wp8/bin/create.js
+++ b/wp8/bin/create.js
@@ -33,7 +33,6 @@ var wscript_shell = WScript.CreateObject("WScript.Shell");
var platformRoot = WScript.ScriptFullName.split('\\bin\\create.js').join('');
var repoRoot = fso.GetParentFolderName(platformRoot);
var args = WScript.Arguments;
-var templatePath = "\\template"
var destPath;
@@ -42,10 +41,11 @@ Log("repoRoot = " + repoRoot);
function Usage() {
- Log("Usage: create PathToNewProject [ PackageName AppName ]");
+ Log("Usage: create PathToNewProject [ PackageName AppName TemplatePath ]");
Log(" PathToNewProject : The path to where you wish to create the project");
- Log(" PackageName : The namespace for the project (default is Cordova.Example)")
+ Log(" PackageName : The namespace for the project (default is Cordova.Example)");
Log(" AppName : The name of the application (default is CordovaAppProj)");
+ Log(" TemplatePath : The path to project template (default is ..\\template)");
Log("examples:");
Log(" create C:\\Users\\anonymous\\Desktop\\MyProject");
Log(" create C:\\Users\\anonymous\\Desktop\\MyProject io.Cordova.Example AnApp");
@@ -154,11 +154,12 @@ function genGuid() {
}
// creates new project in path, with the given package and app name
-function create(path, namespace, name) {
+function create(path, namespace, name, templatePath) {
Log("Creating Cordova-WP8 Project:");
Log("\tPathToNewProject : " + path);
Log("\tPackageName : " + namespace);
Log("\tAppName : " + name);
+ Log("\tTemplatePath : " + templatePath);
// test for valid identifiers, alpha-numeric + _$
if(!/^[a-zA-Z0-9._$]+$/g.test(namespace)) {
@@ -173,7 +174,7 @@ function create(path, namespace, name) {
}
// Copy the template source files to the new destination
- fso.CopyFolder(platformRoot + templatePath, path);
+ fso.CopyFolder(templatePath, path);
// copy over common files
fso.CopyFolder(repoRoot + "\\common", path);
// copy the version file
@@ -258,7 +259,12 @@ if (args.Count() > 0) {
projName = args(2);
}
- create(destPath, packageName, projName);
+ var templatePath = platformRoot + "\\template";
+ if (args.Count() > 3) {
+ templatePath = args(3);
+ }
+
+ create(destPath, packageName, projName, templatePath);
}
else {
Usage();
[2/2] git commit: Merge branch 'CB-4655' of
https://github.com/MSOpenTech/cordova-wp8
Posted by pu...@apache.org.
Merge branch 'CB-4655' of https://github.com/MSOpenTech/cordova-wp8
Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/84b23a50
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/84b23a50
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/84b23a50
Branch: refs/heads/master
Commit: 84b23a505d20ce50094a9e33101b0fefdc6559d8
Parents: 4914c98 11b686b
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Aug 13 18:53:45 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Aug 13 18:53:45 2014 -0700
----------------------------------------------------------------------
wp8/bin/create.js | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/84b23a50/wp8/bin/create.js
----------------------------------------------------------------------
diff --cc wp8/bin/create.js
index b63cb13,d336d97..fdadf09
--- a/wp8/bin/create.js
+++ b/wp8/bin/create.js
@@@ -173,9 -174,9 +174,9 @@@ function create(path, namespace, name,
}
// Copy the template source files to the new destination
- fso.CopyFolder(platformRoot + templatePath, path);
+ fso.CopyFolder(templatePath, path);
// copy over common files
- fso.CopyFolder(repoRoot + "\\common", path);
+ //fso.CopyFolder(repoRoot + "\\common", path);
// copy the version file
fso.CopyFile(repoRoot +'\\VERSION',path + "\\" );