dwyl/learn-dart

Docs: How to publish a package to `pub.dev`

nelsonic opened this issue ยท 13 comments

We have published packages in several languages most recently in Elixir and JavaScript
and documented the process extensively: code-reuse-hexpm.md

Todo

  • Create a new branch e.g: publishing-packages and immediately create a new Pull Request
  • Create a new file: publishing-packages-pub-dev.md
  • Document the process of creating a basic dart package e.g: dwyl/dart_cid#1

    Starting point: https://dart.dev/tools/pub/publishing

  • Assign the PR for review.

Reading the docs now: https://dart.dev/tools/pub/publishing ๐Ÿ‘€

Focus on creating a verified publisher. That way I can use my personal account to publish packages at whim and transfer it to the verified dwyl publisher.

This is a bit of a detour / side-quest ... dwyl/hq#573

image

Error:

image

Looks like it's a waiting game ... โณ

image

Going to have to let this work in the background while I get some sleep ... ๐Ÿ˜ด

Appears to have worked. ๐Ÿคž

image

An example of a Pointless/Terrible use of a Modal ๐Ÿคฆโ€โ™‚๏ธ

dart pub publish --dry-run

Output:

Publishing dart_multihash 0.0.1 to https://pub.dartlang.org:
|-- .github
|   '-- ci.yml
|-- .gitignore
|-- CHANGELOG.md
|-- LICENSE
|-- README.md
|-- analysis_options.yaml
|-- dart_multihash.iml
|-- lib
|   |-- dart_multihash.dart
|   '-- src
|       |-- constants.dart
|       |-- models.dart
|       '-- varintUtils.dart
|-- pubspec.yaml
'-- test
    |-- dart_multihash_test.dart
    '-- dart_varint_test.dart

Package has 0 warnings.

Still BLOCKED? โณ

Created the PR that fixes this issue.
Adds a new file detailing the steps to getting a package published.

#23

Thanks. Will take a look when back at my desk. ๐Ÿ‘Œ