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-11194) Improve cordova load time
Date Thu, 05 May 2016 20:47:12 GMT

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

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

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

    https://github.com/apache/cordova-lib/pull/434#discussion_r62252220
  
    --- Diff: cordova-common/src/superspawn.js ---
    @@ -22,20 +22,20 @@ var fs = require('fs');
     var path = require('path');
     var _ = require('underscore');
     var Q = require('q');
    -var shell = require('shelljs');
     var events = require('./events');
     var iswin32 = process.platform == 'win32';
     
     // On Windows, spawn() for batch files requires absolute path & having the extension.
     function resolveWindowsExe(cmd) {
    +    var which = require('shelljs/src/which');
         var winExtensions = ['.exe', '.bat', '.cmd', '.js', '.vbs'];
         function isValidExe(c) {
             return winExtensions.indexOf(path.extname(c)) !== -1 && fs.existsSync(c);
         }
         if (isValidExe(cmd)) {
             return cmd;
         }
    -    cmd = shell.which(cmd) || cmd;
    +    cmd = which({}, cmd) || cmd;
         if (!isValidExe(cmd)) {
    --- End diff --
    
    I think this won't work now. The non-wrapped `which()` returns a `ShellString` object,
then `path.extname()` throws if `(typeof path !== 'string')`.
    Did you test on Windows?


> Improve cordova load time
> -------------------------
>
>                 Key: CB-11194
>                 URL: https://issues.apache.org/jira/browse/CB-11194
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: Android, CordovaLib
>            Reporter: Nikhil Khandelwal
>            Assignee: Nikhil Khandelwal
>
> We can delay load some of our dependencies to improve our load time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message