Change Bower's Default Components Folder

 ·  · 

I'd like to change Bower's default bower_components folder to vendor/bower in my project, in order to organize all third party libraries under the vendor folder.

First of all, create a .bowerrc file under project root. More precisely, make the .bowerrc file be sibling of bower.json file, under the same folder.

Then configure the new Bower components folder in the .bowerrc file:

{
    "directory" : "vendor/bower"
}

Lastly, delete the old components folder and run install command again.

$ rm -rf bower_components
$ bower install

You are all set.