cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lorinb...@apache.org
Subject [4/5] git commit: [CB-6296] callback/promise interface implemented
Date Mon, 17 Mar 2014 21:20:04 GMT
[CB-6296] callback/promise interface implemented

if a callback parameter is provided, the callback is called and the promise is used internally
only. This should be non-breaking and backwards compatible with the existing use of the cli


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

Branch: refs/heads/master
Commit: 025279abce5103ea092f237efc72d8af297236dc
Parents: bb1b312
Author: lorinbeer <lorin@adobe.com>
Authored: Mon Mar 17 14:18:19 2014 -0700
Committer: lorinbeer <lorin@adobe.com>
Committed: Mon Mar 17 14:18:19 2014 -0700

----------------------------------------------------------------------
 src/create.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/025279ab/src/create.js
----------------------------------------------------------------------
diff --git a/src/create.js b/src/create.js
index ddbd3c3..26798ab 100644
--- a/src/create.js
+++ b/src/create.js
@@ -123,7 +123,7 @@ module.exports = function create (dir, id, name, cfg, callback) {
         });
     }
 
-    return p.then(function(www_lib) {
+    ret = p.then(function(www_lib) {
         // Keep going into child "www" folder if exists in stock app package.
         while (fs.existsSync(path.join(www_lib, 'www'))) {
             www_lib = path.join(www_lib, 'www');
@@ -171,4 +171,10 @@ module.exports = function create (dir, id, name, cfg, callback) {
             config.write();
         }
     });
+
+    if (callback) {
+        return null;
+    }
+
+    return ret;
 };


Mime
View raw message