benschwarz / sublime-bower

Install Bower packages from within Sublime
MIT License
226 stars 12 forks source link

Multiple folders in project window alway defaults to first folder #12

Closed asuh closed 11 years ago

asuh commented 11 years ago

This bower plugin is great, thank you for your work!

I tried this on a project which I have added several folders to the project. The first two folders contain assets and files already but I wanted to add HTML5 Boilerplate to the third folder which was empty at the time. (I realize H5Bp isn't really a true component of a project but it seems like Bower could be an efficient way to import the files into the project. Otherwise, I suppose I should try Nettuts Fetch to do this).

Using package control, I started an instance of bower to install it. I assumed that since I had the first two folders collapsed and the third one expanded, it would install the components directory into the third folder. However, it installed it in the first one every time.

Can there be a way to choose which folder in the project to install?

benschwarz commented 11 years ago

Yeah! You absolutely can change where the files are installed — you'll need to add a .bowerrc file to your project directory.

{
  "directory": "public/components"
}

If you always wanted to install your components to public/components you could move your .bowerrc file to your home directory… then it'll apply to every project you work on!

There are more details about .bowerrc on the bower github page