[英]How do I run a private pub server while still referencing packages from pub.dartlang.org?
Assuming that I'm running my own instance of pub-dartlang
for a private pub feed; 假设我正在运行我自己的
pub-dartlang
实例,用于私人酒吧订阅源; how do I indicate in pubspec.yaml
which packages come from the private feed vs pub.dartlang.org? 我如何在
pubspec.yaml
中pubspec.yaml
哪些软件包来自私有feed vs pub.dartlang.org?
You can set the environment variable PUB_HOSTED_URL
so it points to your custom pub repo server. 您可以设置环境变量
PUB_HOSTED_URL
,使其指向您的自定义pub repo服务器。 This way pub
loads all packages which don't have a server specified from this server. 这样
pub
加载所有没有从该服务器指定的服务器的软件包。
You can define exceptions in pubspec.yaml
like 您可以在
pubspec.yaml
定义异常
dependencies:
transmogrify:
hosted:
name: transmogrify
url: http://some-package-server.com
see https://www.dartlang.org/tools/pub/dependencies.html for more details. 有关详细信息,请参阅https://www.dartlang.org/tools/pub/dependencies.html 。
There is another package that seems to provide a custom Pub repo https://pub.dartlang.org/packages/pub_proxy_server 还有另一个包似乎提供了一个自定义的Pub repo https://pub.dartlang.org/packages/pub_proxy_server
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.