简体   繁体   English

离线私有NPM存储库

[英]Offline private NPM repository

I read about building private NPM mirrors/repositories, but didn't quite understand. 我读到了有关构建私有NPM镜像/存储库的内容,但并不十分了解。

My goal is to make a repository that currently up to date, that contains all NPM packages available at the NPM website (The free packages) that I need. 我的目标是创建一个当前最新的存储库,其中包含我需要的NPM网站(免费软件包)上提供的所有NPM软件包。 After downloading all packages I need to move it to a private network which is not connected to the internet. 下载所有软件包后,我需要将其移动到未连接到互联网的专用网络。 And set up a repository that will accept NPM requests in that private network. 并设置一个存储库,该存储库将接受该专用网络中的NPM请求。

every month I will update the packages I have outside the private network, and enter it to our private network again. 每个月我都会更新私有网络外的软件包,然后再次将其输入我们的专用网络。

I never done anything like this before, Can anyone like guide me through it or Does anyone has a reading source that will explain step by step? 我之前从未做过这样的事情,任何人都可以通过它指导我,还是有人有一个可以一步一步解释的阅读资源?

Good day ! 美好的一天 !

This appears to be one way of doing what you want: 这似乎是做你想做的事情的一种方式:

https://web.archive.org/web/20160310020204/https://www.clock.co.uk/blog/how-to-create-a-private-npmjs-repository https://web.archive.org/web/20160310020204/https://www.clock.co.uk/blog/how-to-create-a-private-npmjs-repository

(I've updated the link to a Wayback machine link since it was taken offline by original host.) (我已经更新了Wayback机器链接的链接,因为它被原始主机脱机了。)

UPDATE: There seem to be a few ways to do this now. 更新:现在似乎有几种方法可以做到这一点。

For example: 例如:

  1. https://codebox.sh/ - free private npm registry https://codebox.sh/ - 免费私人npm注册表
  2. http://blog.runkit.com/2016/09/13/tonic-is-now-runkit-a-part-of-stripe.html : "We started by buidling module-fs, a virtual filesystem capable of representing the entire state of npm at any particular microsecond. With module-fs we could make every version of the over 300,000 packages on npm available instantly. With truly immediate and frictionless access to any package, you could begin to think of npm as the global standard library, as essential to development tomorrow as built-in libraries are today." http://blog.runkit.com/2016/09/13/tonic-is-now-runkit-a-part-of-stripe.html :“我们从buidling module-fs开始,这是一个能够代表在任何特定的微秒级,npm的整个状态。使用module-fs,我们可以立即在npm上提供超过300,000个软件包的每个版本。通过对任何软件包的真正即时和无摩擦访问,您可以开始将npm视为全局标准库,对于明天的发展至关重要,因为现在的内置图书馆。“

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM