Specify package dependencies within the grunt-bower-concat task

I use bower and grunt-bower-concat in my projects.

I had an issue recently when trying to add Flexslider to my project using bower. After installing the console in my browser was saying that jQuery was not recognised. Flexslider was therefore not working.

The problem was that the bower_concat task was concatenating the packages in the wrong order.

I fixed this by following the instructions in the grunt-bower-concat readme file. See below:

Unfortunately not all Bower components list their dependencies. If components concatenate in the wrong order, use this option to manually specify dependencies for those components.

dependencies: {
  'underscore': 'jquery',
  'mygallery': ['jquery', 'fotorama']
}