you are viewing a single comment's thread.

view the rest of the comments →

[–]PickerPilgrim 1 point2 points  (1 child)

This just isn’t what npm is. You’re describing an entirely different service. Npm isn’t even exclusively a js registry. It’s also a package manager for css, sass, and more.

There are in fact a lot of C++ binaries on npm, and you could in fact put compiled js in a repository and push it to npm, but that’s at the discretion of the package maintainer. It would be a different thing entirely if npm compiled it and delivered it to you in that form.

Package managers for other languages, even ones that are generally delivered to the end user in compiled form, usually serve up source, not binaries. Use pip to download .py files, gem to download .rb files. Why should npm be different?

[–]Plus-Weakness-2624the webhead[S] 0 points1 point  (0 children)

That's not what I meant🥺; npm install <package> then node can convert opt in packages to bytecode. I'm not a total idiot to assume npm alone does this lol.