FWIW, I also bumped into this in my previous job.
I even wrote this (https://github.com/neurogeek/g-npm) which is incomplete
but saved me a bunch of time creating a crazy amount of npm ebuilds.

<kinda rant>
My experience is, this isn't worth it. npm is a mess, is
maintainer-unfriendly (although it might be argued that it is
developer-friendly) and they basically don't care about about distributions
at all.
npm packages are not meant to be installed globally. They are content with
having duplicate dependencies laying around everywhere.

Their "semantic versioning" sucks. They 1.4.1.2 can break backwards
compatibility with 1.4.1.1 and nobody cares.
I didn't find a way to download specific versions, and had trouble when
they did stuff like "depend on 1.4.x", because of the above.

Also, although minor point, the other reason I stopped pursuing this was
because I think npm packages are needlessly small. So, you might want to
install a package that depends on tens of other packages that depend on
tens of packages themselves. Most of this packages are 10 lines of code.
So, I ended up real fat with an dev-nodejs category with over a hundred
packages.
</kinda rant>

Having said all that, this was at least a couple of years ago. They might
have come to their senses by now.

Cheers,

On Tue, Jun 30, 2015 at 10:06 AM, Michael Orlitzky <m...@gentoo.org> wrote:

> On 06/30/2015 03:56 AM, Ian Delaney wrote:
> >
> > Is this what I prompted about a year or more ago, and drew no interest
> > in pursuing the npm path?  I cited an eclass called npm.eclass in a
> > dev's overlay. The conclusion was that using npm to install anything
> > competed with portage at a level that made it a 'no go'. This came
> > from members of the portage 'team'. It is a very awkward topic.
> >
>
> No, but we may have wound up with a similar idea. I only became
> interested last week when somebody gave me a coffeescript program to
> deploy at work and there was no coffeescript.
>
> My eclass isn't using npm to do the actual install, since npm won't do a
> global install. I am using it as a lazy way to run the test suite ("npm
> test"), and I'm defaulting to npmjs.org as HOMEPAGE/SRC_URI because they
> have nice predictable URLs. But the src_install manually copies the
> javascript bits to a location where node can find them.
>
>
>


-- 
Jesus Rivero (Neurogeek)
Gentoo Developer

Reply via email to