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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to