davedave
davedave

Reputation: 603

How can I tell bower where to install packages?

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?

Upvotes: 7

Views: 2698

Answers (1)

meda
meda

Reputation: 45490

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.

Upvotes: 8

Related Questions