cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-5063) "Prepare" should not depend on the ~/.cordova/libs directory
Date Thu, 07 Nov 2013 22:09:20 GMT

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

ASF subversion and git services commented on CB-5063:
-----------------------------------------------------

Commit 3a4c978e10214868210b13a1144ca0ae0d9b99a1 in branch refs/heads/master from [~kamrik]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=3a4c978 ]

CB-5063: Keep cordova.js in platform_www to avoid copying it from lib.

Currently all platform parsers (src/metadata/*_parser.js) copy
cordova.js from util.libDirectory for each run of prepare. This results
in errors when changing machines since the ~/.cordova/lib directory is
not populated.

With this change all the parsers construct the project www dir by first
copying contents of a new dir named platform_www (which contains
cordova.js) and then the www dir from the app.

Until individual platform create scripts will be updated to create the
platform_www dir, prepare.js checks if the platform_www exists and if
not, creates it using cordova.js from ~/.cordova/lib.

Even after the platform create scripts are updated the check will be
required for projects that were created using older version and don't
yet have a platform_www dir.

CB-5063: Keep cordova.js in platform_www to avoid copying it from lib.

Currently all platform parsers (src/metadata/*_parser.js) copy
cordova.js from util.libDirectory for each run of prepare. This results
in errors when changing machines since the ~/.cordova/lib directory is
not populated.

With this change all the parsers construct the project www dir by first
copying contents of a new dir named platform_www (which contains
cordova.js) and then the www dir from the app.

Until individual platform create scripts will be updated to create the
platform_www dir, prepare.js checks if the platform_www exists and if
not, creates it using cordova.js from ~/.cordova/lib.

Even after the platform create scripts are updated the check will be
required for projects that were created using older version and don't
yet have a platform_www dir.


> "Prepare" should not depend on the ~/.cordova/libs directory
> ------------------------------------------------------------
>
>                 Key: CB-5063
>                 URL: https://issues.apache.org/jira/browse/CB-5063
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>            Reporter: Andrew Grieve
>            Assignee: Mark Koudritsky
>            Priority: Minor
>
> Look in src/metadata/*_parser.js
> They all have logic in `update_www()` to copy the cordova.js file from util.libDirectory.
> When users change machines, this turns into an error since the ~/.lib directory is not
populated.
> On iOS, the fix is trivial - a copy of cordova.js already exists at platforms/ios/CordovaLib/cordova.js
> For other platforms, we could trivially fix the problem just by not blowing away the
www/cordova.js file during prepare, but I think it would be better to not rely on that since
likely people should not be committing the generated www/ into source control.
> Instead, let's ensure that all platforms keep a copy of their cordova.js file within
their platform/ directory and use copy that into www/ during prepare.
> We could maybe even get rid of the custom logic entirely by putting the cordova.js file
within `merges/` upon `platform add`.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message