JavaScript dependency management: npm vs. bower vs. volo

How do you compare npm , bower and volo ?

All three can be used to install JavaScript dependencies for a UI project. I understand npm is more node specific.

So, when to use what?

npm still stands distant, but bower and volo seem to be solving exactly the same problem, although I am not able to draw a line between npm and bower-volo .


A description that best describes the difference between npm and bower is: npm manages JavaScript modules called packages and Bower manages front-end components (ie css, html, and JavaScript) called components. npm is also used to install bower. Here is an expansive article on npm and bower (does not cover volo) it goes into plenty of detail.



They seem to be solving the same problem but for different environments/worlds. NPM for nodejs and volo, bower for the browser.

The truth is that you can use NPM also to manage javascript and css for the browser. There is nothing preventing you from doing it. In that sense using NPM feels more natural to me than having to manage two different tools for the same purpose.

It seems that bower have more packages available, at least for the more popular ones. But soon jQuery will be also be available in NPM directly and probably all the other libraries will follow the same trend.

In my opinion, since there are tools like browserify and webmake out there, that help use node modules in the browser, there is not anymore a real need for bower or volo , unless they offer something else for you (a particular module existing only in their registries).

Both Volo and Bower are good too, but from my point of view, if you're already using NPM, it might be better to stick to it.

Please note that you can use NPM to manage your client dependencies even without using browserify or webmake . In most of the projects I have being working on, after the npm modules are installed I run an script to deploy them to the location where my client app uses them. Sometimes I use grunt to concatenate that file with other js files and sometimes I reference it directly from the template files of my web apps. In any case, this is a personal preference. Others could find Bower or Volo easier to use as they fit more natural in their workflows.

链接地址: http://www.djcxy.com/p/18050.html

上一篇: 查找已安装的npm软件包的版本

下一篇: JavaScript依赖管理:npm vs. bower vs. volo