apache / cordova-cli

Apache Cordova CLI
Apache License 2.0
940 stars 339 forks source link

`cordova create` creates outdated `res` folder #404

Closed janpio closed 5 years ago

janpio commented 5 years ago

When I use cordova create to create a new project, I also get a res folder that has loads of outdated screens and icons:

E:.
├───icon
│   ├───android
│   ├───bada
│   ├───bada-wac
│   ├───blackberry
│   ├───blackberry10
│   ├───ios
│   ├───tizen
│   ├───webos
│   └───windows-phone
└───screen
    ├───android
    ├───bada
    ├───bada-wac
    ├───blackberry
    ├───blackberry10
    ├───ios
    ├───tizen
    ├───webos
    └───windows-phone

The README in the folder ironically says:

Note that these image resources are not copied into a project when a project
is created with the CLI. Although there are default image resources in a
newly-created project, those come from the platform-specific project template,
which can generally be found in the platform's `template` directory. Until
icon and splashscreen support is added to the CLI, these image resources
aren't used directly.

See https://issues.apache.org/jira/browse/CB-5145

I couldn't figure out where both the files and the README are coming from.

(Fresh install of 8.1.2 (cordova-lib@8.1.1))

janpio commented 5 years ago

Turns out this was already removed in Mai 2018: https://github.com/apache/cordova-app-hello-world/pull/21 Current version of that repo is 4.0.0, which was tagged/released in December 2018 - so I don't really understand why I am getting an older version on project creation.

Is the version pinned maybe to an older one?

janpio commented 5 years ago

Yep, seems so: https://github.com/apache/cordova-create/blame/f85490a9e2ce44bf93a4d0dc688d85ac863d0e8b/package.json#L28 This was only changed 2 months ago, but the CLI I am using is probably using a version that does not include those changes yet.

So can I assume that the problem will be fixed with/in Cordova 9 @erisu?

brodycj commented 5 years ago

https://github.com/apache/cordova-create/blame/f85490a9e2ce44bf93a4d0dc688d85ac863d0e8b/package.json#L28

The change in https://github.com/apache/cordova-create/commit/4c273098ad68c158ac568014a6fbf93b0539ecc7 was part of cordova-create@2.0.0 but cordova-lib still seems to be at cordova-create@1: https://github.com/apache/cordova-lib/blob/54a9b3d0670d1c8217024ec1e9fc23b9ae428a6e/package.json#L21

So can I assume that the problem will be fixed with/in Cordova 9 @erisu?

Yes. We have not yet reached the stage of preparing cordova-lib for Cordova 9 in apache/cordova#10.

janpio commented 5 years ago

Thanks for confirming @brodybits. (These dependency chains are breaking my brain.)

Will be great to have that change out there.