You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ka...@apache.org on 2014/10/14 20:30:33 UTC
git commit: Expose cordova-lib from cordova-cli
Repository: cordova-cli
Updated Branches:
refs/heads/master 585c7b0cf -> 9ab51c2ce
Expose cordova-lib from cordova-cli
Downstream packages that depend on both cordova-lib and cordova-cli have two
copies of cordova-lib. One as direct dependency in node-modules/cordova-lib
and the other as cordova-cli's dep in
node_modules/cordova/node_modules/corodva-lib.
The two copies might end up being of different versions, but even if they are
identical it still results in two separate instances of the EventEmitter and
breaks event registration and handling in some cases.
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/9ab51c2c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/9ab51c2c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/9ab51c2c
Branch: refs/heads/master
Commit: 9ab51c2ce43547df35e9cc32ceadb4dc6af05b94
Parents: 585c7b0
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Tue Oct 14 12:25:19 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Tue Oct 14 12:25:19 2014 -0400
----------------------------------------------------------------------
src/cli.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/9ab51c2c/src/cli.js
----------------------------------------------------------------------
diff --git a/src/cli.js b/src/cli.js
index 0a26cf7..3864634 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -26,7 +26,7 @@
var path = require('path'),
fs = require('fs'),
help = require('./help'),
- nopt,
+ nopt,
_;
var cordova_lib = require('cordova-lib'),
@@ -39,7 +39,7 @@ var cordova_lib = require('cordova-lib'),
/*
* init
*
- * initializes nopt and underscore
+ * initializes nopt and underscore
* nopt and underscore are require()d in try-catch below to print a nice error
* message if one of them is not installed.
*/
@@ -57,6 +57,10 @@ function init() {
};
module.exports = cli
+// Also export the cordova-lib so that downstream consumers of cordova lib and
+// CLI will be able to use CLI's cordova-lib and avoid the risk of having two
+// different versions of cordova-lib.
+module.exports.cordova_lib = cordova_lib
function cli(inputArgs) {
// When changing command line arguments, update doc/help.txt accordingly.
var knownOpts =
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org