cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblotsky <...@git.apache.org>
Subject [GitHub] cordova-paramedic pull request: Real time logging and other improv...
Date Fri, 25 Mar 2016 11:23:33 GMT
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-paramedic/pull/1#discussion_r57437252
  
    --- Diff: lib/ParamedicConfig.js ---
    @@ -0,0 +1,83 @@
    +var Target = require('./Target');
    +
    +var DEFAULT_START_PORT = 8008;
    +var DEFAULT_END_PORT = 8018;
    +var DEFAULT_TIMEOUT = 10 * 60 * 1000; // 10 minutes in msec - this will become a param
    +
    +function ParamedicConfig(json) {
    +    this._config = json;
    +}
    +
    +ParamedicConfig.parseFromArguments = function (argv) {
    +    return new ParamedicConfig({
    +        "targets": [{
    +            platform: argv.platform,
    +            action: !!argv.justbuild ? 'build' : 'run',
    +            args: (!!argv.browserify ? '--browserify ' : '') + (!!argv.device ? '--device'
: '')
    +        }],
    +        "plugins":   Array.isArray(argv.plugin) ? argv.plugin : [argv.plugin],
    +        "useTunnel": !!argv.useTunnel,
    +        "verbose":   !!argv.verbose,
    +        "startPort": argv.startport || argv.port,
    +        "endPort":   argv.endport || argv.port,
    +        "externalServerUrl": argv.externalServerUrl,
    +        "reportSavePath":  !!argv.reportSavePath? argv.reportSavePath: undefined,
    +        "cleanUpAfterRun": !!argv.cleanUpAfterRun? true: false
    +    });
    +};
    +
    +ParamedicConfig.parseFromFile = function (paramedicConfigPath) {
    +    return new ParamedicConfig(require(paramedicConfigPath));
    +};
    +
    +ParamedicConfig.prototype.useTunnel = function () {
    +    return this._config.useTunnel;
    +
    --- End diff --
    
    Extra newline.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message