On Mon, Jul 4, 2016 at 1:20 AM, Nicolas Bock <nicolasb...@gentoo.org> wrote: > On 07/04/2016 10:15 AM, Daniel Campbell wrote: >> On 07/04/2016 12:57 AM, Nicolas Bock wrote: >>> Hi, >>> >>> I would like to package a code that depends on JavaScript packages. The >>> suggested installation procedure from upstream involves running `npm >>> install ...`. How do we (or do we?) deal with JavaScript packages? >>> >>> Best, >>> >>> Nick >>> >> The better question to ask is "what does this program need in order to >> function?" If it installed through 'npm', that's going to point to Node. >> Whatever format Node uses for its packages, you should read it and find >> out if it requires anything else besides Node. If other Node packages >> are needed, they may be in the tree already. >> > The program runs without JS. However, it can also run a server that > provides a UI through a browser. That's the part that requires the JS. >
I've seen some packages provide a "pre-built" javascript bundle, which is great because then you don't need a bunch of nodejs modules just to minify some javascript and whatnot. Alternatively, you could have a pre-made tarball of nodejs modules that's downloaded via SRC_URI and used only at build time.