When developing a Cordova/Phonegap app, once the initial setup is in place, typically all that is needed is to periodically sync the www/ directory with each platform you are targeting, and test. Running "cordova build" works, in that regard, but it is really slow and does a lot more than just synchronize the www/ directories.
The documentation for the Cordova CLI api is somewhat meager… it says which commands you need to run to get your apps running on various platforms, but says very little, if anything, about what each command actually does or is supposed to do. Is it even necessary to run "cordova build" after the project is initially set up? Or is there another (faster) CLI command for just syncing the www/ dir when I want to test a small change? I tried "cordova prepare", but it only seems to build the config.xml file for each platform. Is the slow "cordova build" command really the only way prepare my app for testing (aside from building my own, custom synchronizer)?
On a side note, it's not just the slowness of the "cordova build" command that is holding me up, the command is also somewhat fragile. I have a separate stackoverflow question for a specific problem I'm having with it, but I'm hoping the "build" command might be avoidable altogether and that someone might know of a better synchronizing command that the referenced documentation doesn't cover and/or know of some better documentation for the CLI API.
cordova prepare
update www
folder too.
more specifically :
- prepare [platform...] copies files into the specified platforms, or all platforms. It is then ready for building by Eclipse, Xcode, etc.
- compile [platform...] compiles the app into a binary for each targetted platform. With no parameters, builds for all platforms, otherwise builds for the specified platforms.
- build [platform...] an alias for cordova prepare followed by cordova compile.