dart-lang / dart-lang/pub-dev

A way to tell pub that my package is a CLI app

Open
#6,410 2 comments 0 reactions 0 assignees View on GitHub
Type: enhancement
Dominant language
Dart
Stars
944
Forks
184
Avg merge
1d 15h
Merged PRs (30d)
12

Description

Currently this is my score section on pub for my CLI only package:

![image](https://user-images.githubusercontent.com/882703/110214903-d896ce00-7e74-11eb-907a-b481e06a98a3.png)

Since my app is just a CLI app (to be used with `pub global activate`) and not intended to be used as a dependency for other packages, I believe some of these rules do not apply. Not only that reduces the score but having a clean set of checks allow me to know I am not missing anything. I don't want to let go of the other great checks just because they are hidden among checks that are not directed to my cli package.

Specifically:
* example app: I don't have an example app because it can't be used as a dependency, doesn't make sense.
* public API doc: this is contentions as I believe there is some value in document public apis as the users of my CLI app might want to dig into the code to figure out how it works and what it does so docs could be good; I believe it's much less useful than if it was a regular library package, maybe could lose less points or something. But I don't have a strong opinion about this one.
* Support multiple platforms: as a CLI-only app this doesn't make sense at all.

My proposal would be to add a new flag to the pubspec.yaml file to inform pub that my package is cli only. In fact, this flag/field could be improved to better inform these tags:

![image](https://user-images.githubusercontent.com/882703/110215051-b5205300-7e75-11eb-90c0-b6ec5a388128.png)

Currently they are automatically computed but not every package makes sense to work across all platforms. Maybe it's a package that is mobile specific and makes no sense on web, or maybe it's a CLI tool that has nothing to do with flutter. I am not sure exactly what it would look like on the pubpsec but I believe there is room to add something that would help pub make better decisions about these tags and how it scores packages.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.