Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5063

"Prepare" should not depend on the ~/.cordova/libs directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • cordova-cli
    • None

    Description

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

      Attachments

        Activity

          People

            kamrik Mark Koudritsky
            agrieve Andrew Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: