Question

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 components folder
  • the other inside app/components folder

So for example, when I run the command yeoman install jquery

my project directory will look like this

 root-directory
 |- app
 .  |- components
 .  .  |- jquery        // <<-- jquery  
 .  .  ... rest of the components
 |- components
 .  |- jquery           // <<-- jquery ... again
 .  ... same other components
  • Why I have a duplicate to each component, and which one should I use?
  • I guess the best practice is to reference those components from my app, and never alter them so I can update them easily, am I correct?
Was it helpful?

Solution

This was done as a temporary hack because of the need to have components in the /app folder, since Bower didn't have a way to specify the component directory. Now it does, and this will be fixed very soon.

You can follow the bug here: https://github.com/yeoman/yeoman/issues/622

OTHER TIPS

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 components
$ grunt server
... run the server
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top