Voxelum / minecraft-launcher-core-node

Provide packages to install Minecraft, launch Minecraft and more to build launcher with NodeJs/Electron!
https://docs.xmcl.app/en/core/
MIT License
174 stars 25 forks source link

Add documentation generation with Typedoc #130

Closed lukechu10 closed 4 years ago

lukechu10 commented 4 years ago

Add generated documentation from JSDocs in code to GitHub Pages.

lukechu10 commented 4 years ago

I am kind of confused with how the pages workflow works. Right now, the docs are generated into the docs/docs folder but I never used parcel so I do not know how to set it up to serve the docs.

I set up a new script in the package.json to generate the docs: dev:docs. Tell me if you want to change it.

I also need to fix up how the documentation is structured because the modules are kind of messed up in the docs.

Lastly, do you want me to add a Semantic-UI theme to the docs or is the built-in one fine?

Edit: Right now, the docs is structured so that there is one page for each file except for test files. Do you want me to try to only have 1 page per package? For example, a page for @xmcl/core and a page for @xmcl/installer.

lukechu10 commented 4 years ago

Actually, I moved the output to docs/build/docs so when the user navigates to /docs, they will land on the documentation home page. I also renamed the script to build:docs

lukechu10 commented 4 years ago

Actually, don't merge this yet. I want to figure out how to use this: https://github.com/christopherthielen/typedoc-plugin-external-module-name

Edit: Hmm, it seems like I need to add tags at the beginning of every source file.

HoldYourWaffle commented 4 years ago

This PR changes some indentation to tabs instead of spaces, which I'm personally a fan of, just felt like I should mention it.

lukechu10 commented 4 years ago

This PR changes some indentation to tabs instead of spaces, which I'm personally a fan of, just felt like I should mention it.

Oh, sorry. Must have been the auto-formatter in my workspace. I can change it back if you want.

HoldYourWaffle commented 4 years ago

Well personally I'd be a big fan of using tabs everywhere, but I only just merged my first (not very valuable) PR. It's up to @ci010 to decide 😉

ci010 commented 4 years ago

Nice! I think it's okay for one file one page, as we don't have that much files and I think it won't be too mess.

About the theme, I don't find the semantic ui theme for the typedoc. We can keep the default theme right now, and improve it look and feel through iterations.

If you are ready to merge, just let me know

lukechu10 commented 4 years ago

If you are ready to merge, just let me know

Go ahead.

lukechu10 commented 4 years ago

Hmm, there seems to be something wrong with the production. All the paths to the modules are broken. Let me see if I can fix that.