离线私有NPM存储库 [英] Offline private NPM repository

查看:164
本文介绍了离线私有NPM存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过有关构建私有NPM镜像/存储库的内容,但并不太了解。

I read about building private NPM mirrors/repositories, but didn't quite understand.

我的目标是创建一个当前最新的存储库,其中包含我需要的NPM网站上提供的所有NPM包(免费包)。
下载所有软件包后,我需要将其移至未连接到互联网的专用网络。
并设置一个存储库,接受该私有网络中的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. 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.

我每个月都会更新私有网络外的软件包,然后输入它再次进入我们的私人网络。

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?

美好的一天!

推荐答案

这似乎是一种方式做你想做的事:

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

(自从它被采取以来,我已经更新了Wayback机器链接的链接原始主机离线。)

(I've updated the link to a Wayback machine link since it was taken offline by original host.)

更新:现在似乎有几种方法可以做到这一点。

UPDATE: There seem to be a few ways to do this now.

例如:


  1. https:// codebox.sh/ - 免费私人npm注册表

  2. 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视为全球标准库,这对于明天的开发至关重要,因为现在内置库。

  1. https://codebox.sh/ - free private npm registry
  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."

这篇关于离线私有NPM存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆