Closed jwasilgeo closed 8 years ago
Looking good! I didn't get a chance to look at the redundancy too much. But, that's an easy fix for another PR.
I have one suggested addition to the README. There should be an explanation on how to change which app is launched. If the info's already there, then my bad. If the info isn't there, then what do you think about adding a new bullet to the README similar to:
config.xml
in the original-src
property:<content src="http://10.61.3.225:8100" original-src="index.html"/>
Oh, perhaps then I misunderstood the entry points and ways to manage ionic apps. I recreated all folder structure in both apps, and currently require a dev to run npm install
for each app within the apps directory. Maybe this all can be shuffled around? Or, do I misunderstand the point of the config's original-src
property?
Ah hah! I get the structure now. You raise a really good point. Stepping back for just a sec...I don't think there's a "one right way" to do this. Plus I did make a mistake above.
The pattern I mention is a slight hack. It allows you to share a single /www
directory that contains multiple samples. However, the developer has to tell the cordova which sample to use by manually modifying the config.xml file. For Android you go to android/res/xml/config.xml
and modify <content src="index.html" />
. Note, there is where I messed up above, it's not original-src
.
The downsides to this approach are you have to modify config.xml. The advantage is you only need one /www directory and once you make the change you just rebuild the app on the desired platform.
Thoughts?
Thanks for your feedback and thoughts. I'm unsure either way, given all the pros/cons. If you have a preference, we can just run ahead with that.
Gotcha. If that's the case, I'd lean towards the "config.xml hack" approach because it doesn't lead to duplicate code and the developer can easily swap between multiple applications using the same build by changing a single property.
Closing this out to be replaced by new PR
...to accommodate having more than 1 app within this repo.
Please take note of the new instructions in the README.
@andygup please review and merge if satisfied. I hope I didn't copy too many redundant files for both the original tabbed app and the new full screen app.
Resolves #13.