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']

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s