-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15328/
-----------------------------------------------------------
Review request for cordova.
Bugs: CB-5063
https://issues.apache.org/jira/browse/CB-5063
Repository: cordova-cli
Description
-------
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.
Diffs
-----
spec/metadata/android_parser.spec.js e5ade8645d41540325d07f01bfc4461dc16dfedd
spec/metadata/blackberry_parser.spec.js
dec807af479023cf00deeb04c36d1d0ebcef766d
spec/metadata/ios_parser.spec.js 7c01bacf3cae1415c32d168c86e8a0d9c504a927
spec/metadata/windows8_parser.spec.js
61a78b4b2760718fcee74618af007f068722e228
spec/metadata/wp7_parser.spec.js 0a7d575ec96e7c8f58b3c89287f5c503f6ee2ecf
spec/metadata/wp8_parser.spec.js 01e38526f1c932436da27cecdb3bc2a2e4100e89
spec/prepare.spec.js 8012924b12864e96ef2fdb2535ee73a6e97bf205
src/metadata/android_parser.js 41e939b6c6bf04de3e251a110f5d7d48bf3b7b4d
src/metadata/blackberry10_parser.js d9f71f30f11486b754799624acad39bbb2283a76
src/metadata/firefoxos_parser.js c3edd7b7f919e7bbf7e1bdc9af830633c28ea160
src/metadata/ios_parser.js 20e985cc0377b91ca349fa1e0280494c177eedcd
src/metadata/windows8_parser.js da64e03f4da5b7ee81999eb5a5daa9ba59912b74
src/metadata/wp7_parser.js baf000cb09e5d18e4ca4b389001d810dbc872ceb
src/metadata/wp8_parser.js 62a387e5df538b037026cadd9624ede051265c40
src/prepare.js 4ea22c59368e85c8f5034787b4aeee2a5d9fa108
Diff: https://reviews.apache.org/r/15328/diff/
Testing
-------
npm test (same failures as on master)
cordova create TstApp
cd TstApp
crodova platform add adnroid
cordova prepare
cordova build
Thanks,
Mark Koudritsky