Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install bower dependencies in a specific directory?

Tags:

bower

yeoman

I'm building a yeoman generator for simple websites. I want to include a popular JavaScript library in my scaffold.

It's easy enough with bower install <mylib>. Bower then installs the library in the directory bower_components.

How can configure bower to install that particular library in a particular directory?

like image 274
davedave Avatar asked Oct 30 '13 00:10

davedave


People also ask

Where is .bowerrc file?

. bowerrc file located in user's home folder ( %USERPROFILE% ) bowerrc (without the dot) file located in %APPDATA%/bower/config.

What command is used install Bower globally?

Install Bower Globally - npm install -g bower. Download & Install Git. Create your Project Directory and cd into the project directory just created.

How do you install Bower Windows?

To install Bower on Windows, you are required to install NPM (Node Package Manager) first. Using NPM, we can easily install the Bower front-end package manager. If you have installed NPM on windows, you can use the “npm install -g bower” command in the command prompt to install Bower on windows.

Where does Bower install packages?

Install packages Bower installs packages to bower_components/ . A package can be a GitHub shorthand, a Git endpoint, a URL, and more. Read more about bower install .


1 Answers

Create a file called .bowerrc in the same directory as your bower.json with the contents:

{
  "directory": "bower"
}

Bower will then install all dependencies in the directory "bower" or whatever directory you specify.

Hope that helps!

like image 132
jvandemo Avatar answered Oct 20 '22 04:10

jvandemo