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 2016/03/04 01:36:26 UTC
[48/50] cordova-paramedic git commit: added support for --browserify
added support for --browserify
Project: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/commit/0818793d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/tree/0818793d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/diff/0818793d
Branch: refs/heads/master
Commit: 0818793d1e35d7ece9bec250c593ef6d192165cc
Parents: c55403b
Author: Steve Gill <st...@gmail.com>
Authored: Tue May 19 17:27:06 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Tue May 19 17:27:06 2015 -0700
----------------------------------------------------------------------
main.js | 7 ++++---
paramedic.js | 12 +++++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/0818793d/main.js
----------------------------------------------------------------------
diff --git a/main.js b/main.js
index db3bd3e..03a1a20 100755
--- a/main.js
+++ b/main.js
@@ -7,7 +7,7 @@ var plugins,
platformId;
var USAGE = "Error missing args. \n" +
- "cordova-paramedic --platform PLATFORM --plugin PATH [--justbuild --timeout MSECS --port PORTNUM]" +
+ "cordova-paramedic --platform PLATFORM --plugin PATH [--justbuild --timeout MSECS --port PORTNUM --browserify]" +
"`PLATFORM` : the platform id, currently only supports 'ios'\n" +
"`PATH` : the relative or absolute path to a plugin folder\n" +
"\texpected to have a 'tests' folder.\n" +
@@ -16,7 +16,8 @@ var USAGE = "Error missing args. \n" +
"`MSECS` : (optional) time in millisecs to wait for tests to pass|fail \n" +
"\t(defaults to 10 minutes) \n" +
"`PORTNUM` : (optional) port to use for posting results from emulator back to paramedic server\n" +
- "--justbuild : (optional) just builds the project, without running the tests";
+ "--justbuild : (optional) just builds the project, without running the tests \n" +
+ "--browserify : (optional) plugins are browserified into cordova.js";
var argv = parseArgs(process.argv.slice(2));
@@ -36,5 +37,5 @@ var onComplete = function(resCode,resObj,logStr) {
process.exit(resCode);
};
-paramedic.run(argv.platform, argv.plugin, onComplete, argv.justbuild, argv.port, argv.timeout,false);
+paramedic.run(argv.platform, argv.plugin, onComplete, argv.justbuild, argv.port, argv.timeout, argv.browserify, false);
http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/0818793d/paramedic.js
----------------------------------------------------------------------
diff --git a/paramedic.js b/paramedic.js
index ad9d787..09d7aed 100644
--- a/paramedic.js
+++ b/paramedic.js
@@ -14,7 +14,7 @@ var TIMEOUT = 10 * 60 * 1000; // 10 minutes in msec - this will become a param
-function ParamedicRunner(_platformId,_plugins,_callback,bJustBuild,nPort,msTimeout,bSilent) {
+function ParamedicRunner(_platformId,_plugins,_callback,bJustBuild,nPort,msTimeout,browserify,bSilent) {
this.tunneledUrl = "";
this.port = nPort;
this.justBuild = bJustBuild;
@@ -23,6 +23,12 @@ function ParamedicRunner(_platformId,_plugins,_callback,bJustBuild,nPort,msTimeo
this.callback = _callback;
this.tempFolder = null;
this.timeout = msTimeout;
+
+ if(browserify) {
+ this.browserify = "--browserify";
+ } else {
+ this.browserify = '';
+ }
if(bSilent) {
var logOutput = this.logOutput = [];
@@ -214,7 +220,7 @@ ParamedicRunner.prototype = {
if(self.justBuild) {
self.logMessage("cordova-paramedic: adding platform");
shell.exec('cordova platform add ' + self.platformId,{silent:true});
- shell.exec('cordova prepare',{silent:true});
+ shell.exec('cordova prepare '+ self.browserify,{silent:true});
self.logMessage("building ...");
shell.exec('cordova build ' + self.platformId.split("@")[0],
@@ -235,7 +241,7 @@ ParamedicRunner.prototype = {
self.setConfigStartPage();
self.logMessage("cordova-paramedic: adding platform");
shell.exec('cordova platform add ' + self.platformId,{silent:true});
- shell.exec('cordova prepare',{silent:true});
+ shell.exec('cordova prepare '+ self.browserify,{silent:true});
shell.exec('cordova emulate ' + self.platformId.split("@")[0] + " --phone",
{async:true,silent:true},
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org