admin管理员组文章数量:1297124
When I install packages using Yeoman (which behind the scenes uses Bower), I see that bower installs each package twice..
- the first in the root of the project under
ponents
folder - the other inside
app/ponents
folder
So for example, when I run the mand yeoman install jquery
my project directory will look like this
root-directory
|- app
. |- ponents
. . |- jquery // <<-- jquery
. . ... rest of the ponents
|- ponents
. |- jquery // <<-- jquery ... again
. ... same other ponents
- Why I have a duplicate to each ponent, and which one should I use?
- I guess the best practice is to reference those ponents from my app, and never alter them so I can update them easily, am I correct?
When I install packages using Yeoman (which behind the scenes uses Bower), I see that bower installs each package twice..
- the first in the root of the project under
ponents
folder - the other inside
app/ponents
folder
So for example, when I run the mand yeoman install jquery
my project directory will look like this
root-directory
|- app
. |- ponents
. . |- jquery // <<-- jquery
. . ... rest of the ponents
|- ponents
. |- jquery // <<-- jquery ... again
. ... same other ponents
- Why I have a duplicate to each ponent, and which one should I use?
- I guess the best practice is to reference those ponents from my app, and never alter them so I can update them easily, am I correct?
- Are these actually two separate copies of the package, or is one a symlink pointing to the other? – ruakh Commented Nov 30, 2012 at 22:31
- two separate but identical copies.. – Anas Nakawa Commented Dec 1, 2012 at 7:53
2 Answers
Reset to default 11 +50This was done as a temporary hack because of the need to have ponents in the /app folder, since Bower didn't have a way to specify the ponent directory. Now it does, and this will be fixed very soon.
You can follow the bug here: https://github./yeoman/yeoman/issues/622
This is fixed now in the 1.0 Beta of Yeoman. http://yeoman.io/road.html
The team have decided that yeoman should just do the setup of a project, and leave the actual building and installing of dependencies to grunt and bower respectively.
This means that you now do:
$ yo init
... setup
$ npm install
... get node modules
$ bower install
... get bower ponents
$ grunt server
... run the server
本文标签: javascriptWhy does bower install packages twiceStack Overflow
版权声明:本文标题:javascript - Why does bower install packages twice? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741641491a2389944.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论