Let’s say we’re building an app for ios, what would be a good .gitignore file? In other words, what should be ignored when committing a project to git?
This is undoubtedly related to phonegap/cordova, but since I’m not to both, any advice would greatly speed up my learning process.
Well taken out of context, no. If you are using a bare cordova project, you should not ignore that directory.
However, I highly recommend the yeoman generator. It does quite a bit for you out of the box.
Note that the www/index.html is a minified version of the app/index.html. This includes concatenating/minifying all of a particular app’s bower components that have been installed into one file, as well as your own files that you have added manually. It also does the same for your sass files – which is more advantageous that writing some custom css given the fact that ionic has some pretty sweet mixins that you can take advantage of.
The current way that I take advantage of the sass mixins is by importing the main ionic sass file into my own app.sass like so:
@import '../bower_components/ionic/scss/ionic'
This allows me to quickly extend the base styles that Ionic has already created with great ease. The only downside to this is, given the automated nature of the build process for this yeoman generator, the ionic css will be included twice when it builds/concatenates/minifies the sass file. Currently, the easiest way I have found to circumvent this is to remove any reference to a css file in the main array for the app/bower_components/ionic/bower.json and app/bower_components/ionic/.bower.json files respectively.
I know I’m following up on this a little late, but any recommendations for a .gitignore for people not using yeoman yet. I’m just diving into ionic, working off of their starter app, etc, and trying to determine the best way to set up my .gitignore so that I’m not tracking a lot of unnecessary files.