Pergunta

I understand that I can publish my packages, and every project including a pubspec file is automatically a package.

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...

Now I am not sure if I should add the empty 'lib' and publish or if there is another way for application packages.

Thank you

Foi útil?

Solução

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).

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top