Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managing phonegap / cordova project with git

What's the best practise for managing a phonegap project in git?

Currently I have the www folder as a git repository, but the iPhone version of phonegap adds a phonegap.js into that folder and I don't want to commit that because it is iPhone specific (I want to share the repo between the different platforms). I'm also worried that I am probably putting the .git folder onto the phone (which is a complete waste of space).

Also, should I be minifying all my code before bundling it into the app (e.g. with uglify.js). How can I keep the unminified code in git, and have XCode's build and run command (for the iPhone version) minifiy it before copying it to the phone?

What about Eclipse/Android?

Edit This question is highly outdated now, based on older versions of phonegap. Cordova cli and corodva 3 have changed the landscape completely (for the better). See this question.

like image 467
rjmunro Avatar asked Mar 02 '11 09:03

rjmunro


People also ask

Is Cordova outdated?

Replying to the question of whether Cordova is deprecated or still relevant, we want to start with the allegation that Apache Cordova is still alive. The concrete markers comprise new updates with improvements and fixes. Cordova Android 10.1. 1 was released in September 2021.

What is difference between PhoneGap and Cordova?

The same is true here: Cordova is the open source version of the framework, while PhoneGap is the Adobe-branded version. In the end, there is little difference between the two efforts. There are some slight differences in the command-line interfaces, but the functionality is the same.

How Cordova works internally?

Cordova acts as a container for the app that you write using web technologies. When the app is compiled, your code actually stays intact. The compiler just takes your code and makes it available to the web view for rendering. If you've ever opened an HTML file in a browser, that's basically the same thing.


1 Answers

You can disable the automatic generation of phonega.js.

  • On the left panel of XCode go to Targets -> Your App
  • Double on "Copy Phonegap Javascript" and modify it according to your needs.

Then you can also modify all the other shell scripts or add your own scripts to fit your needs.

like image 76
Felipe Brahm Avatar answered Oct 19 '22 03:10

Felipe Brahm