Ionic-cli: With platforms directory missing, `ionic cordova prepare` adds caret to version numbers

Created on 10 May 2017  路  8Comments  路  Source: ionic-team/ionic-cli

See https://github.com/driftyco/ionic-cli/issues/2146#issuecomment-300565357

ionic cordova prepare asks to install platforms if the platforms/ directory is missing. It should check config.xml for any <engine /> definitions instead. If they don't exist, then ask. Otherwise, always just run cordova prepare.

bug

Most helpful comment

@zarko-tg I recommend using just cordova prepare for now. If you are an experienced user, you may think about just using pure cordova for platform/plugin management. You may still want to use ionic cordova during development for our build, livereload, etc.

All 8 comments

This is more or less a showstopper for us in 3.0.0, the main issue being the inability to restore (add) platforms already specified as engines in config.xml without getting that prompt.
"? Platform FOO is not installed! Would you like to install it? ___"
What's the reason to ask at all if the engines are already saved in config.xml?

Otherwise both "platforms" and "plugins" directories must be created automatically if non-existent (I think pure cordova cli already does this).
The thing with the caret is probably a separate issue.

@zarko-tg I recommend using just cordova prepare for now. If you are an experienced user, you may think about just using pure cordova for platform/plugin management. You may still want to use ionic cordova during development for our build, livereload, etc.

"What's the reason to ask at all if the engines are already saved in config.xml?"
-> It's a bug. We'll treat it as one. It should be checking config.xml, but it's actually looking at your directories.

Cheers, that was a good tip.
Also, for a moment I thought I could do away with "ionic cordova ..." commands and use pure cordova but we're talking Angular/Ionic 2+ here, so tough luck :)

@zarko-tg I view ionic cordova ... as a stopgap. I will be working on improving the tooling situation. =)

You better, or else we switch back to Ionic1 =)

@zarko-tg Can you test that the functionality is acceptable in the latest alpha? I just pushed.

npm i -g ionic@canary

Thanks @dwieeb. On my part it'll have to wait until Monday.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

richardshergold picture richardshergold  路  3Comments

zoinkydoink picture zoinkydoink  路  3Comments

secret4info picture secret4info  路  3Comments

phyr0s picture phyr0s  路  3Comments

mpaland picture mpaland  路  3Comments