0

Is it possible to manually download an NPM package into a particular folder?

I want to compare the code of a NPM package via a diff with a similar version which I have in my repository. Rather than downloading to the node_modules folder it would be helpfull if I could place it next to my own code as its easier for me to diff that way.

Evanss
  • 20,529
  • 79
  • 252
  • 460

1 Answers1

0

Try the following:

mkdir test
cd test
npm init -f
npm install <package@version>

The package is available at test/node_modules/<package>

Anton Drukh
  • 843
  • 7
  • 12