Skip to content

Make Cordova entirely opt-in (--cordova) #2595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
imhoffd opened this issue Aug 2, 2017 · 5 comments
Closed

Make Cordova entirely opt-in (--cordova) #2595

imhoffd opened this issue Aug 2, 2017 · 5 comments
Milestone

Comments

@imhoffd
Copy link
Contributor

imhoffd commented Aug 2, 2017

As of CLI 3.7, ionic start asks the dev if they'd like to integrate Cordova with their app. If they respond no, Cordova files from the starters still get included, such as config.xml and all the default resources. This shouldn't happen.

  • Cordova should be entirely opt-in.
  • Make sure the dev can opt into Cordova at any point during app development, not just ionic start.
  • Keep other target platforms in mind such as electron.
@janpio
Copy link
Contributor

janpio commented Aug 2, 2017

asks the dev if they'd like to integrate Cordova with their app.

What will the question be here? Please include something like "Do you want to build for native mobile platforms?" so it is really clear what htis is, otherwise this will lead to so many posts and issues with newbies accidentally missing stuff.

If they respond no, Cordova files from the starters still get included, such as config.xml and all the default resources.

Cordova files are identical for all starters (minus the changes made by CLI for name and package ID) afaik. Wouldn't it make sense to move these files out of the starters (into its own repo that is applied on top of base and starter)?

A bigger thought:
If we talk about multiple "packagers" (term "platform" is already in use by Cordova...), wouldn't it even make sense to move the individual stuff down a folder level to cordova (including plugins, platforms, config.xml, resources) in the long run to seperate the actual app from the "packager" stuff?
(Yeah, "packager" doesn't work. Just "target"?)

@imhoffd
Copy link
Contributor Author

imhoffd commented Aug 2, 2017

What will the question be here?

The question is currently: Would you like to integrate your new app with Cordova to target native iOS and Android?

Wouldn't it make sense to move these files out of the starters (into its own repo that is applied on top of base and starter)?

That's precisely what I thought of doing, but I may also put them in the Ionic CLI repo as templates.

As for your last question, Cordova has a very strict app structure. I'm not sure it's a huge deal that those are in the base level, either.

@janpio
Copy link
Contributor

janpio commented Aug 2, 2017

The question is currently: Would you like to integrate your new app with Cordova to target native iOS and Android?

Sounds good.

That's precisely what I thought of doing, but I may also put them in the Ionic CLI repo as templates.

Better, less to download. And Cordova moves much slower than the starter templates anyway.

As for your last question, Cordova has a very strict app structure. I'm not sure it's a huge deal that those are in the base level, either.

Imagine /cordova, /electron and /pwa folders next to each other, each one containing the stuff needed for only this container-wrapper-packager-platform... But yeah, of course the Cordova CLI could be a problem. You would at least have to teach cordova prepare to look somewhere else for /www (or use a symlink... nice...).

@imhoffd
Copy link
Contributor Author

imhoffd commented Sep 5, 2017

📝 Also have an --id for the bundle ID.

@imhoffd
Copy link
Contributor Author

imhoffd commented Nov 9, 2017

This is pretty much done with 3.17.0 and 3.18.0.

--bundle-id issue: #2871

@imhoffd imhoffd closed this as completed Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants