Open shamilovtim opened 4 years ago
Interesting. Is this a feature request?
With Angular CLI's --watch
option, it rebuilds and writes to www
, but in order to deploy the app again, devs have to run cordova prepare
, which copies app assets from www
to platforms/<platform>/app/src/main/assets/www
(or whatever Cordova chooses to use).
Do you propose that ionic cordova prepare --watch
runs both ng build --watch
and then also watches www
and runs cordova prepare
when the directory changes?
@dwieeb Yes it's very difficult to setup a plugin development environment because of this being missing. I had to create a custom gulp script. Even still, symlinking in Gradle is broken so I was unable to really get a clean env going.
@shamilovtim Would you mind sharing the gulp script?
https://github.com/shamilovtim/cordova-plugin-feed-fm/blob/master/example/gulpfile.js
I'm not sure how useful the remove/addback plugin series is because I came to find out that gradle still does not support symlinked files (this is an issue dating back years). That being said the prepare watch worked fine.
Yeah, Cordova itself doesn't play well with symlinks. I find I am often just manually rsync-ing. 😂
Thanks for sharing! I just wanted to triple-check that we were talking about the same thing, and we are. This feature would be great. 👌
Just curious, have you tried plugin development with Capacitor?
No this case I was doing it for freelance as a side gig and I'm pretty familiar with the very small API of Cordova. I don't know much about Capacitator but I'm guessing it isn't backwards compatible with Cordova?
Many Cordova plugins work with Capacitor. Some don't. A lot of more essential plugins ship with Capacitor core as well. More info: https://capacitor.ionicframework.com/docs/cordova/migrating-from-cordova-to-capacitor
Forgot to make a note: 📝 This feature is dependent on https://github.com/ionic-team/angular-toolkit/issues/138
Description: when trying to using
ionic cordova prepare ios --watch
the following error is thrown:Unknown option: '--watch'
My
ionic info
: