Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell bower where to install packages?

Tags:

bower

I'm figuring out how to install packages using bower.

When I 'bower install packagename', packages are installed in /app/components/.

However, I'd like to dictate the structure of my projects myself.

Is there a way to configure bower to install packages in particular places?

like image 429
davedave Avatar asked Sep 01 '13 23:09

davedave


1 Answers

Bower can be configured using JSON in a .bowerrc file. The directory setting is the path in which installed components should be saved. If not specified it will be install in the default path.

So for example :

{
  "directory" : "package/components",
  "json" : "bower.json"
}

Here we tell bower to install packages in the subfolder package/components, and use a file named bower.json to store its data.

like image 168
meda Avatar answered Dec 09 '22 22:12

meda