I'm in the middle of migrating from an older, in-house process for compiling PhoneGap/Cordova apps to using Sencha Cmd 4.x's Cordova support. Running sencha cordova init... and then sencha app build -run native will produce a cordova/ subdirectory off the root of my project. How much of that cordova/ directory do I need to check into my Git repository?
In general, I do not put compiled assets in my Git repository. For example, the app.scss SASS file *is* in Git, because it is the original, authoritative source code for the styling. However, the resulting app.css CSS file that is generated from the app.scss SASS file with the sencha compass compile resources/sass command is *not* checked into Git, because I want to avoid having to resolve meaningless merge conflicts on an unreadable, minified, one-line CSS file (app.css is essentially treated as a compiled binary). It is the developer's responsibility to be able to do a local build to run the app.
A less philosophical and more practical problem is that, now that I'm generating both Android and iOS builds for Cordova, I have at least four copies of all my static assets, so if I were to check in my cordova/ directory as-is right now (containing a subset of the app's data for dev/test), it would immediately add 47MB to the repo. The contents of my resources/ directory appears to be duplicated in the following places:
Through trial-and-error, I've found that if I remove all of cordova/, it breaks the build, but I just remove cordova/www/, those files are recreated. I'm going to keep going and see if I can also exclude all those duplicated www directories. In the meantime, I thought I should post here and see if anybody has already gone through this exercise and figured this out.
Thanks!
In general, I do not put compiled assets in my Git repository. For example, the app.scss SASS file *is* in Git, because it is the original, authoritative source code for the styling. However, the resulting app.css CSS file that is generated from the app.scss SASS file with the sencha compass compile resources/sass command is *not* checked into Git, because I want to avoid having to resolve meaningless merge conflicts on an unreadable, minified, one-line CSS file (app.css is essentially treated as a compiled binary). It is the developer's responsibility to be able to do a local build to run the app.
A less philosophical and more practical problem is that, now that I'm generating both Android and iOS builds for Cordova, I have at least four copies of all my static assets, so if I were to check in my cordova/ directory as-is right now (containing a subset of the app's data for dev/test), it would immediately add 47MB to the repo. The contents of my resources/ directory appears to be duplicated in the following places:
Code:
cordova/platforms/android/assets/www/resources
cordova/platforms/ios/build/emulator/<MyAppName>.app/www/resources
cordova/www/resources
Through trial-and-error, I've found that if I remove all of cordova/, it breaks the build, but I just remove cordova/www/, those files are recreated. I'm going to keep going and see if I can also exclude all those duplicated www directories. In the meantime, I thought I should post here and see if anybody has already gone through this exercise and figured this out.
Thanks!
Aucun commentaire:
Enregistrer un commentaire