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
.
Library collection
requires at least one library
in package.
By convention libraries resides in 'lib'
directory.
If you have library
(under the current rules you should have it) it means that you have it in 'lib'
directory.
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).
This limitation prevent publish similar packages (without libraries
).