Download source from npm without installing it

后端 未结 6 1532
既然无缘
既然无缘 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:54

    If you haven't installed npm, with the current public API, you can also access the information about a package in the npm registry from the URL https://registry.npmjs.org//.

    Then you can navigate the JSON at versions > (version number) > dist > tarball to get the URL of the code archive and download it.

提交回复
热议问题