cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabbage <...@git.apache.org>
Subject [GitHub] cordova-js pull request: CB-7332: Fixed Windows path issue when tr...
Date Tue, 19 Aug 2014 00:22:36 GMT
Github user purplecabbage commented on a diff in the pull request:

    https://github.com/apache/cordova-js/pull/77#discussion_r16390788
  
    --- Diff: tasks/lib/require-tr.js ---
    @@ -86,7 +88,15 @@ function _updateRequires(code) {
         if(node instanceof UglifyJS.AST_Call) {
           // check if function call is a require('module') call
           if(node.expression.name === "require" && node.args.length === 1) {
    +
    +        // Uglify is not able to recognize Windows style paths using '\' instead of '/'
    +        // So replacing all of the '/' back to Windows '\'
    +        if (node.args[0].value != undefined && node.args[0].value.indexOf('c:')
!= -1) {
    --- End diff --
    
    this will only work on the c: drive, have you considered testing ```process.platform ===
'win32'```


---
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.
---

Mime
View raw message