Phonegap requires a www folder, but PG Build wants index.html and config.xml in the root.
How can I create a single repo, that works for Phonegap (i.e phonegap serve from cmd) but that also works with PhoneGap Build using a git repo as a source?
I've tried copying the index.html from www into the root and adding it to my repo (and adjusting the asset paths) but that doesn't work (I just get a white screen). I tried adding an empty index.html in my root with just <script>window.location.replace('www/index.html')</script> - which works, but cordova isn't present and none of the pg plugins work.
Is there a example repo somewhere so I can see a layout, or is it not even possible?
At the moment we're having to build using PG Build using a zip file (which is time consuming and error prone) every time we want to do a build.
Surely there must be a better way?
Ok - I've resolved this. Apparently, the git repo doesn't require the config.xml and index.html to be in the root, that's only a requirement of the zip upload.
So my repo is just:
And build seems to work with this configuration (as does phonegap running locally).
There seems to be a lot of confusion about this. Surely the zip requires a www folder with index.html and config.xml ... mine has that ... I think some clear clarification is required as to the project folder structure that is required and whether that changes (hopefully not!) between various methods.
One is surely zipping MyProject folder which has a www inside it ... otherwise why have a www folder at all.
MyProject <=== zip this