How can I download the source code of a package from npm without actually installing it (i.e. without using npm install thepackage)?
npm install thepackage
You can use npm view [package name] dist.tarball which will return the URL of the compressed package file.
npm view [package name] dist.tarball
Here's an example using wget to download the tarball:
wget
wget $(npm view lodash dist.tarball)
1.4m articles
1.4m replys
5 comments
57.0k users