{"id":1189,"date":"2013-07-16T18:34:30","date_gmt":"2013-07-17T00:34:30","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=1189"},"modified":"2013-07-23T14:52:14","modified_gmt":"2013-07-23T20:52:14","slug":"placing-cordova-cli-projects-under-version-control","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/1189","title":{"rendered":"Placing Cordova CLI projects under version control"},"content":{"rendered":"<p>If you do software development, you should use version control, and Cordova projects are no different.  However, Cordova CLI generates a fair number of derived artifacts which shouldn&#8217;t be placed under version control.<\/p>\n<p>The typical Cordova CLI project has at a minimum these directories in the project.<\/p>\n<ul>\n<li>www: where your html, css and javascript live<\/li>\n<li>merges: platforms specific html, css, javascript<\/li>\n<li>.cordova: &#8216;under the hood&#8217; cordova files and directories, and lifecycle hook scripts<\/li>\n<li>platforms: platform specific build directories<\/li>\n<li>plugins: downloadable plugins<\/li>\n<\/ul>\n<p>Based on <a href=\"http:\/\/stackoverflow.com\/questions\/16989933\/what-parts-of-cordova-cli-generated-projects-can-be-safely-versioned-in-source-c\">this Stack Overflow question<\/a> (which I asked), as well as my experience, the first three directories above should be versioned, and the latter two added to your version control system&#8217;s ignore file. <\/p>\n<p>You can, of course, add additional top level directories, and as we continue to explore Cordova CLI, I will show you the directories I have found useful in my development.  I don&#8217;t think it really matters much which version control system you use&#8211;just use one!<\/p>\n<p>In the next post, I will discuss upgrading Cordova CLI, one of the great reasons to keep these directories under version control.<\/p>\n<p><a href=\"http:\/\/eepurl.com\/BHYJ9\">Subscribe to my infrequent Cordova newsletter<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you do software development, you should use version control, and Cordova projects are no different. However, Cordova CLI generates a fair number of derived artifacts which shouldn&#8217;t be placed [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64,7,60],"tags":[],"class_list":["post-1189","post","type-post","status-publish","format-standard","hentry","category-cordova-cli","category-mobile-technology","category-phonegap"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/1189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1189"}],"version-history":[{"count":5,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/1189\/revisions"}],"predecessor-version":[{"id":1283,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/1189\/revisions\/1283"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}