aptabase / aptabase-swift

Swift SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps
https://aptabase.com
MIT License
21 stars 8 forks source link

Add documentation and DocC support #5

Closed manucheri closed 1 year ago

manucheri commented 1 year ago

This PR adds basic code documentation for all public types, mostly based on the docs that were already present in the code.

I also made some of the types that seem to be meant to only be used internally by the package non-public. If this was incorrect I can change back.

Additionally it adds DocC (https://developer.apple.com/documentation/docc) support, for easy generation of documentation based on the documentation comments.

I was going to also add the generated HTML/CSS documentation in a /docs folder that can be backed by Github Pages, but I'm waiting with that to see what the interest is from the package author. If this is wanted I can add it to this PR, or in a follow up PR.

goenning commented 1 year ago

It all looks good to me, thanks for the PR :)

As for HTML/CSS documentation, that sounds like a good ideal. Is that a common thing on Swift packages? I'm not an iOS dev so I'm not too familiar with it

manucheri commented 1 year ago

It all looks good to me, thanks for the PR :)

As for HTML/CSS documentation, that sounds like a good ideal. Is that a common thing on Swift packages? I'm not an iOS dev so I'm not too familiar with it

DocC is still somewhat new but fully supported and updated by Apple. It will provide a nicely designed/formatted way of navigating the docs, which is easily updated based on the source code, and with a look a feel similar to that of Apple's official documentation.

I can take a look at adding the HTML/CSS stuff to a /docs folder in this repository and setup with Github Pages. It can then easily be referenced from the README (and even replace most of the onboarding in the README if wanted) or similar. Would you like that as part of this PR, or a follow up?

goenning commented 1 year ago

Sounds good, let's do it.

I don't have any preference, could be on this PR or a separate, whatever is best for you

manucheri commented 1 year ago

Sounds good, let's do it.

I don't have any preference, could be on this PR or a separate, whatever is best for you

Let's merge this and I will take a look at generating the docs later. :)