目录

Contents

dart pub 上传

Uploader 命令是 Pub 工具 中的一个命令。

Uploader is one of the commands of the pub tool.

$ dart pub uploader [options] {add/remove} <email>

该命令允许 pub.dev 网站上某个 Package 的 上传者 为该 Package 添加或删除其它的上传者。其有两个子命令 addremove,可以将电子邮件地址作为某个上传者的标识以此来添加或删除上传者。例如:

This command allows uploaders of a package on the pub.dev site to add (invite) or remove other uploaders for that package. It has two sub-commands, add and remove, that take the email address of the person to add/remove as an uploader. For example:

~/code/transmogrify$ dart pub uploader add [email protected]
We've sent an invitation email to [email protected].
They'll be added as an uploader after they accept the invitation.

~/code/transmogrify$ dart pub uploader remove [email protected]
[email protected] has been removed as an uploader for this package.

如果 Package 有且只有一个上传者,则该上传者不能再被删除。你可以将自己从上传者列表中删除(只要 Package 中还有其它的上传者即可),但是一旦你删除了自己后则不能再将自己添加回去。

If a package has only one uploader, that uploader can’t be removed. You can remove yourself as an uploader (as long as other uploaders are available), but you can’t re-add yourself again afterwards.

默认情况下,你修改的是当前工作目录中 Package 的上传者。你可以通过 --package 标识来指定修改哪个 Package 的上传者。例如:

By default, the package in the current working directory will have its uploaders modified. You can also pass the --package flag to choose a package by name. For example:

$ dart pub uploader --package=transmogrify add [email protected]
We've sent an invitation email to [email protected].
They'll be added as an uploader after they accept the invitation.

需要注意的是 Google 账户是上传者的识别标识,所以请使用 Gmail 或者 Google 应用电子邮件地址作为新上传者的标识。

Note that uploaders are identified by their Google accounts, so use a Gmail or Google Apps email address for any new uploaders.

选项

Options

你可以查阅 全局选项 获取 Pub 命令所支持的命令选项。

For options that apply to all pub commands, see Global options.

--package=<package name>

指定上传器要修改哪个 package。默认为当前目录下的 package。

Specifies which package to modify the uploaders for. Defaults to the package in the current directory.