I dont want to upload my dart packages to pub.dev but I want to share them effectively with my team

huangapple go评论66阅读模式
英文:

I dont want to upload my dart packages to pub.dev but I want to share them effectively with my team

问题

最近,我们开始创建自己的Dart包,并希望有效地分享它们(如果有人更新它,每个人都可以使用"pub"命令拉取最新版本)。所以我想知道是否有可能为我们自己托管一个小型的"pub.dev",并配置pub以从那里拉取包。

我不知道从哪里开始或如何创建这样的东西。

英文:

So lately we started creating our own dart packages and want to share them effectively (if someone updates it everyone can just pull the newest version with the pub command) So I was wondeing if it would be possible to host our own little "pub.dev" just for us and to configure pub so that it pulls the packages from there

I have no plan on where to start or how to make such a thing

答案1

得分: 1

你可以将包上传到你公司的GitHub,在pubspec.yaml文件中可以这样导入它:

  package:
    git: https://github.com/user/package.git
    ref: main

或者使用https://pub.dev/packages/unpub来托管你的私有Pub服务器。

英文:

You can upload package to your company's GitHub and in pubspec.yaml you can import it as:

  package:
    git: https://github.com/user/package.git
    ref: main

Or use https://pub.dev/packages/unpub to host your private Pub server.

huangapple
  • 本文由 发表于 2023年7月13日 21:44:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76680089.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定