Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What parts of cordova cli generated projects can be safely versioned in source control?

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?

like image 822
mooreds Avatar asked Jun 07 '13 17:06

mooreds


People also ask

Which command is used to install plugin in cordova?

Install the cordova module using npm utility of Node. js. The cordova module will automatically be downloaded by the npm utility. On OS X and Linux, prefixing the npm command with sudo may be necessary to install this development utility in otherwise restricted directories such as /usr/local/share .


1 Answers

It depends on you project and your workflow.

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.

Examples:

  • ./merges for platform specific HTML/CSS/JS overrides
  • ./.cordova for cli hooks (like before_build, after_plugin_add, etc)

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.

Instead of including a specific folder, I have a .gitignore that keeps build artefacts like ./platforms/* and ./plugins/* out of version control.

like image 64
Devgeeks Avatar answered Sep 22 '22 05:09

Devgeeks