cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-5082) add BB10 support in doPlatform()
Date Tue, 03 Jun 2014 14:45:05 GMT

    [ https://issues.apache.org/jira/browse/CB-5082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14016567#comment-14016567
] 

ASF GitHub Bot commented on CB-5082:
------------------------------------

Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/7#discussion_r13337873
  
    --- Diff: cordova-lib/src/cordova/info.js ---
    @@ -31,23 +31,50 @@ var cordova_util = require('./util'),
     
     // Execute using a child_process exec, for any async command
     function execSpawn(command, args, resultMsg, errorMsg) {
    -    return superspawn.spawn(command, args).then(function(result) {
    +    return superspawn.spawn(command, args).then(function (result) {
             return resultMsg + result;
    -    }, function(error) {
    +    }, function (error) {
             return errorMsg + error;
         });
     }
     
    +//Collects data from promise, and it returns a promise
    +function preparePromise(promise, headline) {
    +    var output = "";
    +    resultList = promise.state === 'fullfilled' ? promise.value : promise.reason;
    +    if (resultList.length > 0) {
    +        resultList.map(function (result) {
    +            output += result.name + ' ip: ' + result.ip + '\n';
    +        });
    +        return Q(headline + ':\n' + output);
    +    }
    +    return Q(headline + ':\n' + 'Not found');
    +}
    +
     function getPlatformInfo(platform, projectRoot) {
         switch (platform) {
         case 'ios':
             return execSpawn('xcodebuild', ['-version'], 'iOS platform:\n\n', 'Error retrieving
iOS platform information: ');
         case 'android':
             return execSpawn('android', ['list', 'target'], 'Android platform:\n\n', 'Error
retrieving Android platform information: ');
    +    case 'blackberry10':
    +        var bbUtilsPath = path.join(projectRoot, 'platforms', platform, 'cordova');
    +        return Q.allSettled([
    +                Q.nfcall(require(path.join(bbUtilsPath, 'lib', 'target-utils')).getTargetList,
'emulator', false),
    +                Q.nfcall(require(path.join(bbUtilsPath, 'lib', 'target-utils')).getTargetList,
'device', false)
    --- End diff --
    
    @kamrik is saying that you should cache at least:
    require(path.join(bbUtilsPath, 'lib', 'target-utils'))
    
    In a var somewhere. 
    
    Specifically right after the var bbUtilsPath line:



> add BB10 support in doPlatform()
> --------------------------------
>
>                 Key: CB-5082
>                 URL: https://issues.apache.org/jira/browse/CB-5082
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: CLI
>            Reporter: Marcel Kinard
>            Assignee: Martin Gonzalez
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message