本文介绍了使用git管理phonegap / cordova项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在git中管理一个phonegap项目的最佳做法是什么?

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

目前我有一个www文件夹作为git仓库,但iPhone版本的phonegap增加了一个phonegap .js到那个文件夹,我不想提交,因为它是iPhone特定的(我想在不同的平台之间共享repo)。我也担心我可能把.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).

此外,我应该把所有的代码,然后将其捆绑到应用中(例如使用)。我如何保持未分类的代码在git,并有XCode的构建和运行命令(iPhone版)minifiy它复制到手机之前?

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?

Eclipse / Android?

What about Eclipse/Android?

编辑现在,这个问题已经过时,基于较旧版本的phonegap。科尔多瓦cli和corodva 3完全改变了景观(为更好)。请参见。 p>

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.

推荐答案

您可以禁用phonega.js的自动生成。

You can disable the automatic generation of phonega.js.


  • 在XCode的左侧面板上,转到目标 - >您的应用

  • 双击复制Phonegap Javascript,然后根据需要进行修改。

然后您还可以修改所有其他shell脚本或添加您自己的脚本以满足您的需要。

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

这篇关于使用git管理phonegap / cordova项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 20:07