pd4d10 / unpub

Self-hosted private Dart Pub server for Enterprise

Home Page:https://pub.dev/packages/unpub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation on how to use

bsutton opened this issue · comments

So looks like a useful tool however when I started reading the documentation it goes straight into details on how to use its internal api..

What I actually wanted to see was:

  1. what changes are required in my pubspec.yaml to reference the private repo.
  2. how to I publish to a private repo.

If you want to use your own package server, you can use a description that specifies its URL:

dependencies:
  transmogrify:
    hosted:
      name: transmogrify
      url: http://your-package-server.com
    version: ^1.4.0

https://dart.dev/tools/pub/dependencies#hosted-packages

Publish_to
The default uses the pub.dev site. Specify none to prevent a package from being published. This setting can be used to specify a custom pub package server to publish.

publish_to: http://your-package-server.com

https://dart.dev/tools/pub/pubspec#publish_to

Thanks for the answer! @amondnet

An alternative way is to set the PUB_HOSTED_URL, see https://dart.dev/tools/pub/environment-variables.

Unpub will serve the private packages, and also provide proxy to upstream for public packages

I'm going to close this. Feel free to reopen it if there are other problems.