Download a package from npm as a tar (not installing it to a module)

前端 未结 5 875
滥情空心
滥情空心 2021-01-30 06:18

Is there some URL from which I can download a given package from npm (as a tarball or something)? I need the exact files that were originally uploaded to npm.

Using

5条回答
  •  时光说笑
    2021-01-30 07:06

    You can use npm view to get the URL to the registry's tarball (in this example for the module level):

    $ npm view level dist.tarball
    

    And to download tarball, you can use npm pack:

    $ npm pack level
    

提交回复
热议问题