[英]If and How to publish application packages to pub?
I understand that I can publish my packages, and every project including a pubspec file is automatically a package. 我知道我可以发布我的软件包,包括pubspec文件在内的每个项目都会自动发布。
When I want to publish my application package it tell's me, I need a 'lib' folder, but I thought 'lib is only for library packages... 当我想发布我的应用程序包它告诉我,我需要一个'lib'文件夹,但我认为'lib仅适用于库包...
Now I am not sure if I should add the empty 'lib' and publish or if there is another way for application packages. 现在我不确定是否应该添加空的'lib'并发布或者是否有其他方式来应用程序包。
Thank you 谢谢
This is a limitation of current implementation. 这是当前实施的限制。
When the 'pub'
manager publish your package on pub.dartlang.org
it assume that you publish not application
but public library collection
. 当'pub'
管理器在pub.dartlang.org
上发布你的包时,它假定你发布的不是application
而是公共library collection
。
Library collection
requires at least one library
in package. Library collection
至少需要一个library
包。
By convention libraries resides in 'lib'
directory. 按照惯例,库位于'lib'
目录中。
If you have library
(under the current rules you should have it) it means that you have it in 'lib'
directory. 如果您有library
(根据当前规则,您应该拥有它),这意味着您在'lib'
目录中拥有它。
If this ( lib
) directory does not found in your package (also include at least one library
) then your package assumed broken (or has non conventional directory layout). 如果在您的包中找不到此( lib
)目录(也包括至少一个library
),那么您的包假定已损坏(或具有非常规目录布局)。
This limitation prevent publish similar packages (without libraries
). 此限制阻止发布类似的包(没有libraries
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.