You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/04/02 20:20:19 UTC

[jira] [Commented] (CB-6329) [cordova-cli] improve 'cordova info' command to work asynchronous

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

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

Github user martincgg commented on the pull request:

    https://github.com/apache/cordova-cli/pull/151#issuecomment-39364969
  
    Well, the feedback was attended thanks a lot, here's the new commit, this are the changes:
    -Added, proper indent (4 spaces).
    -Removed, trailing whitespace
    -Fixed, callbacks double assignation.
    - \r replaced by \n.
    
    Also, now it uses Q to work with callbacks, this time is going to return
    every value retrieve from the environment, all promises it will be
    called, those promises are callbacks data, Q.allSettled is going to call
    all of them, and then wait until every single one of them is fulfilled
    or rejected, then is going to print the data and save into a file.
    Adding this logic, it returns promises, and cleans the code of heavy
    nesting of callbacks.
    The only disadvantage, is that it requires to wait until everything is done to show it in the screen, if it takes too much time retrieving the data, the user may think that the terminal is frozen, which is unlikely. 
    
    @agrieve is this what you recommend me to do?
    
    https://github.com/martincgg/cordova-cli/blob/31ea565bac97a6f35c484cba3461fb726f24e07a/src/info.js#L42
    
    This is better?. Btw thanks a lot for the feedback.


> [cordova-cli] improve 'cordova info' command to work asynchronous
> -----------------------------------------------------------------
>
>                 Key: CB-6329
>                 URL: https://issues.apache.org/jira/browse/CB-6329
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 3.4.0
>            Reporter: Martin Gonzalez
>            Assignee: Martin Gonzalez
>              Labels: blackberry, cordova-cli, environment, info, wp8
>             Fix For: 3.5.0
>
>
> The 'cordova info' command it works in total sync, it takes some time to pull and push all data from the environment, so in order to use callbacks more friendly, I'd like to modify the flow structure of the file and improve it to use get callback outputs, write summary or log file without templates.
> I also, I'd like to add a secondary file that holds all specific functions related with 'get information about the dev environment'.



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