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/27 01:42:59 UTC

[1/2] git commit: CB-7333 Makes default platform template files overridable

Repository: cordova-windows
Updated Branches:
  refs/heads/master 352e52614 -> 9ccd84e02


CB-7333 Makes default platform template files overridable


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

Branch: refs/heads/master
Commit: db2c0edc522cf4796dcd0eaed8e9c4fa759e1a15
Parents: 70287e4
Author: Vladimir Kotikov <v-...@microsoft.com>
Authored: Tue Aug 19 11:02:57 2014 +0400
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Tue Aug 19 11:42:48 2014 +0400

----------------------------------------------------------------------
 windows/bin/lib/create.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/db2c0edc/windows/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/windows/bin/lib/create.js b/windows/bin/lib/create.js
index 9b0b486..ddfaeb8 100644
--- a/windows/bin/lib/create.js
+++ b/windows/bin/lib/create.js
@@ -38,6 +38,7 @@ module.exports.run = function (argv) {
     var packageName = args.argv.remain[1] || "Cordova.Example",
         appName     = args.argv.remain[2] || "CordovaAppProj",
         safeAppName = appName.replace(/(\.\s|\s\.|\s+|\.+)/g, '_'),
+        templateOverrides = args.argv.remain[3],
         guid        = args['guid'] || uuid.v1(),
         root        = path.join(__dirname, '..', '..');
 
@@ -45,6 +46,9 @@ module.exports.run = function (argv) {
     console.log("\tApp Name  : " + appName);
     console.log("\tNamespace : " + packageName);
     console.log("\tPath      : " + projectPath);
+    if (templateOverrides) {
+        Log("\tCustomTemplatePath : " + templateOverrides);
+    }
 
     // Copy the template source files to the new destination
     console.log('Copying template to ' + projectPath);
@@ -53,6 +57,11 @@ module.exports.run = function (argv) {
     // Copy our unique VERSION file, so peeps can tell what version this project was created from.
     shell.cp("-rf", path.join(root, 'VERSION'), projectPath);
 
+    if (templateOverrides && fs.existsSync(templateOverrides)) {
+        console.log('Copying template overrides from ' + templateOverrides + ' to ' + projectPath);
+        shell.cp("-rf", templateOverrides, projectPath);
+    }
+
     // replace specific values in manifests' templates
     ["package.windows.appxmanifest", "package.windows80.appxmanifest", "package.phone.appxmanifest"].forEach(function (file) {
         var fileToReplace = path.join(projectPath, file);
@@ -75,10 +84,12 @@ module.exports.run = function (argv) {
 };
 
 module.exports.help = function () {
-    console.log("Usage: create PathToProject [ PackageName [ AppName [--guid=<GUID string>] ] ]");
+    console.log("Usage: create PathToProject [ PackageName [ AppName [ CustomTemplate ] ] ] [--guid=<GUID string>]");
     console.log("    PathToProject : The path to where you wish to create the project");
     console.log("    PackageName   : The namespace for the project (default is Cordova.Example)");
     console.log("    AppName       : The name of the application (default is CordovaAppProj)");
+    console.log("    CustomTemplate: The path to project template overrides");
+    console.log("                        (will be copied over default platform template files)");
     console.log("    --guid        : The App's GUID (default is random generated)");
     console.log("examples:");
     console.log("    create C:\\Users\\anonymous\\Desktop\\MyProject");


[2/2] git commit: Merge branch 'CB-7333' of https://github.com/MSOpenTech/cordova-windows

Posted by pu...@apache.org.
Merge branch 'CB-7333' of https://github.com/MSOpenTech/cordova-windows


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

Branch: refs/heads/master
Commit: 9ccd84e02080ad4b43c67913366161b3089ab5df
Parents: 352e526 db2c0ed
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Aug 26 16:42:54 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Aug 26 16:42:54 2014 -0700

----------------------------------------------------------------------
 windows/bin/lib/create.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------