Is there a way I can download an npm package without having to do a npm view XXX ...
or basically just not having to install node/npm? I'm trying to do this on a linux machine.
~EDIT~ I realize I should've added some clarification on what I'm trying to achieve here: all I need are the package's files with dependencies to be served as a static resource on cloudfront. I'm hoping npm provides a way to directly download the artefact like the way maven-central does.
You can access to the raw package using the NPM api.
https://registry.npmjs.org/{package-name}/{version}
The url above will give you a JSON response containing the package metadata. The package property dist.tarball
contains an url where the package can be downloaded.
Keep in mind you have to install the dependencies of the package on your own
Example:
https://registry.npmjs.org/lodash/4.17.10
NPM API documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With