Hi,
what is the right way to manage the emberjs dependecy in an nodejs (expressjs) project with npm?
it seems that the ember version in npm is 1.0.0 and not 1.4.
So how do you guys do it?
Or don’t you use npm with emberjs in your nodejs projects? (simply copy the files manually?)
Thanks
Definitely don’t use the NPM version. Use bower to manage frontend dependencies for the browser, and npm to manage server-side (node) dependencies.
I was just curious where NPM was pulling ember and I found it here. As you can see, it’s a very out of date repository.
Bower will pull down Ember from this repository which is an officially maintained mirror of the actual source repository, specifically targeted towards Bower. Like @alexspeller said, use Bower for this kind of thing.
Hi,
ok thanks for the replys. I’ve got one more question: Isn’t it kind of ugly to have two tools for almost the same job? Even the config files look almost identical. Wouldn’t it be better to update ember in npm and use just one tool or what is the reason for the seperation?
There are actually a lot of mixed feelings about Bower, so you aren’t alone in thinking this. The biggest thing to remember is that Bower is specifically designed for managing front-end resources, eg JQuery, Twitter Bootstrap.
NPM is primarily targeted at more backend oriented solutions, and therefore comes with a bit more complexity and isn’t particularly well suited for front end dependencies. NPM is fine for build tools or server components, but it’s a bit overkill when I just want to add JQuery to my pages.
What you’ll find in a lot of projects is the addition of bower install
as a post install script for NPM. You just run npm install
, it installs all of your build tools/server dependencies AND a local copy of Bower, and then it runs bower install
for you.
It just boils down to separation of concerns.
NPM is primarily targeted at more backend oriented solutions, and therefore comes with a bit more complexity and isn’t particularly well suited for front end dependencies.
Back when this post was originally written, I used to think this, too. Since I still got here from a Google search, I figure it’s worth reviving this conversation. Here are a few of the reasons that I dumped bower, and now just use npm :