-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Automatic documentation generation from TSDoc comments and Improved Workflow #360
base: main
Are you sure you want to change the base?
Conversation
812fd8a
to
1f25120
Compare
Ok, I'm supper happy with this PR I just want to split to better understand how it works and how could be improved. For example, I think it's not necessary to "build" docs manually, could be easily done with a workflow action + autocommit. I'll try to investigate further. In the meanwhile, can we just add TSDoc everywhere in the source code? That is:
Leaving out all the stuff needed for the generation. |
Yes, I would start to add the TSDoc comments to the code in the next couple of days. I would propose we add the docs folder to the .gitinore and make a workflow action that triggers on pushes to the main branch. This workflow would then make a cleanup, generate the docs and force pushes them to main. Then we could activate gh-pages on the main branch and point it to the docs folder. This would look like this: Docs Demo Thanks for taking your time reviewing all my PR's. I realy appreciated it. |
bbaaf2c
to
4601da0
Compare
I have now implemented a proper GitHub workflow. To ensure everything functions smoothly, the GitHub action requires write permissions to the repository. Additionally, once the documentation is generated, you can enable GitHub Pages on the main branch specifically for the ´docs´ directory. This will result in a polished and comprehensive documentation website. |
🔧 Types of changes
🚨 Checklist
Description
This pull request introduces automatic documentation generation using API-extractor and TSDoc. Additionally, the new documentation is linked in the README to provide easy access for users.
The following changes were made:
Automatic documentation Generation: With the integration of API-extractor, the project now automatically generates Documentation from TSDoc comments, improving code documentation and clarity.
Linked Documentation in README: The README has been updated to include a link to the newly generated TSDoc documentation, making it easily accessible to users.
Updated Commands: New commands have been created. All essential commands for the generation of the documentation (format, lint, test, and doc generation) have been combined into a single command named "prepare" to simplify the development workflow.
Updated CONTRIBUTING.md: The CONTRIBUTING.md file has been updated to reflect the changes in the workflow and provide instructions on using the "pre-pull-request" command.
Request for TSDoc Format
Before proceeding with further documentation, I'd like to confirm if it's okay to use TSDoc format for our documentation. Once I receive your approval, I'll start documenting the code accordingly.
Note on Current Documentation
As of now, the automatically generated documentation might not be as useful since the code requires proper commenting according to the TSDoc format. Before merging this pull request, I plan to complete the documentation for the existing codebase.
Questions
For deploying and generating the documentation automatically, one option is to create a GitHub Actions workflow that triggers on push to the main branch. The workflow can run the necessary commands to generate the documentation and deploy it to a specified location.
As for hosting the documentation, creating a separate gh-pages branch and deploying the documentation there is a common approach. By doing so, we can link the website in the README, making it easy for users to access the documentation. Alternatively we leave the documentation simple in the docs folder and link it in the README.