tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: nodejs application packaging guidelines?

> 12. 11. 2015 v 19:23, Richard PALO <>:
> Not being very familiar with nodejs, does there exist any pkgsrc guidelines
> on how to deal with nodejs based packages using 'npm install' and 'grunt'
> This application is a web client interface.
> sort of scared the hell out of me trying a test build with only 'npm install'
> as it seems to install a couple of hundred and various modules from github: with something called 'bower' into a node_modules directory under $WRKSRC.
> worried this 'bower' may something of a 'pip' equivalent from python, I'm 
> looking  for pointers on how to correctly install this beast in a manageable way avoiding nonsense.
> if it is possible;)

Been there, done that, and no, it’s unlikely we will be packaging real node.js (npm) modules. The way npm works is that every package gets its very own set of *all* dependencies. Consider this: on my Mac, I only have four packages that I explicitly installed (json, manta, smartdc and triton). This is how the *tail* of the npm module tree (parsed and counted) looks like:

$ npm -g list --parseable|sed -E 's|^.*/||'|sort|uniq -c|sort -n|tail
   8 minimatch
   8 wrappy
   9 isarray
   9 string_decoder
  10 core-util-is
  10 inherits
  11 readable-stream
  16 verror
  18 assert-plus
  21 extsprintf

And it’s 250+ unique modules installed in total.


Home | Main Index | Thread Index | Old Index