Download source from npm without installing it

后端 未结 6 1514
既然无缘
既然无缘 2020-12-13 01:34

How can I download the source code of a package from npm without actually installing it (i.e. without using npm install thepackage)?

6条回答
  •  一整个雨季
    2020-12-13 01:51

    npm pack XXX is the quickest to type and it'll download an archive.

    Alternatively:

    npm v XXX dist.tarball | xargs curl | tar -xz
    

    this command will also:

    • Download the package with progress bar
    • Extracts into a folder called package

提交回复
热议问题