cordova cli生成的项目的哪些部分可以在源代码控制中安全地版本化? [英] What parts of cordova cli generated projects can be safely versioned in source control?
问题描述
我希望使用 Cordova CLI ,而不是使用本地生成的Ant解决方案来管理手机/科尔多瓦项目。我想知道目录树的哪些部分,如果有的话,不应该放在版本控制之下?
I'm looking to use Cordova CLI instead of a home grown ant solution for command line management of a phonegap/cordova project. I'm wondering what parts of the directory tree, if any, should not be placed under version control?
推荐答案
对于很多项目, ./ www
文件夹就足够了
For a lot of projects, the ./www
folder would be sufficient as already mentioned, however there are some other folders that could be good to have depending on what aspects of the cli you are using.
示例:
-
./ merges
用于平台特定的HTML / CSS / JS覆盖 -
./。cordova
用于cli钩子(如before_build,after_plugin_add等)
./merges
for platform specific HTML/CSS/JS overrides./.cordova
for cli hooks (like before_build, after_plugin_add, etc)
加上任何其他习惯,你可能想在开发过程中保留 ./ www
。例如,我有一个 ./ src
文件夹,内容被连接并添加到 ./ www
我们的构建过程。我们的单元测试也在 ./ www
之外。
Plus anything else custom you might want to keep out of ./www
during development. For example, I have a ./src
folder and the contents are concatenated and added to ./www
as part of our build process. Our unit tests are also outside of ./www
.
我没有包含特定的文件夹, code> .gitignore ,保持构建版本如 ./ platforms / *
和 ./ plugins / / code>超出版本控制。
Instead of including a specific folder, I have a .gitignore
that keeps build artefacts like ./platforms/*
and ./plugins/*
out of version control.
这篇关于cordova cli生成的项目的哪些部分可以在源代码控制中安全地版本化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!