Added support for libraries

Included test cases for coverage

I like this, but it should just mention `publisher.app`, since you can't be publishing a lib with this approach.