How do I install bower dependencies in a specific

2019-02-12 22:05发布

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?

标签: yeoman bower
1条回答
甜甜的少女心
2楼-- · 2019-02-12 22:52

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!

查看更多
登录 后发表回答