-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Replace JSDoc as it is not maintained and is legacy software #1089
Comments
hi, thanks for reaching out ! we have been discussing this actually for years (literally #497) but nobody never took on the task, as honestly it does look like a big one, maybe not anymore in "converting" the tags, but especially in recreating a specific template/theme and all.... but definitely, If you are willing to help, I could hardly say now :) |
Ok will take a look next weekend. |
Hi @ShukantPal, I went ahead and added a npm task to generate webdoc documentation, but it's not as straightforward as you were implying though. So first comments and related questions :
thanks ! Note: I'm using the default template for now ("@webdoc/default-template"), config file is here : https://github.com/melonjs/melonJS/blob/master/webdoc.conf.json |
"opts": {
"export": "melon.api.json" // or false if you don't like it, but please don't :)
} This |
thanks for the quick feedback ! I'll wait for this weekend then for your update so that at least it can fix most of the issue on point 1 and 3, feel free to clone the repo on your side and give it a look (use for the manifest, got it, I'll then move it to where the doc is generated (dist/doc). |
for the error report, for example when running the eslint jsdoc plugin, it gives me this : would be a nice addition as well to have that plugin (or a similar one) also being compatible with the syntax/tags expected by webdoc ! |
and here is the full log :webdoc_error.log |
oh, and one last thing I noticed is that a comment section with the tag |
for the record, and for future discussion about template, I moved the jsdoc one we currerntly use into its own repo here: https://github.com/melonjs/jsdoc-template |
I cloned melonJS locally. The [DepsChain] errors are because webdoc doesn't understand |
Definitely! Please do 🙏🙏🙏 |
@obiot I've released webdoc 1.6.0 with some fixes for your codebase: https://github.com/webdoc-labs/webdoc/releases/tag/v1.6.0. You can pass the There are some parsing failures - some because of webdoc, and some because of melonJS incorrectly documenting symbols. The documentation site is still getting generated, just with some of those omissions. Examples of the latter are where you're declaring members above if statements. webdoc doesn't know what you're documenting and there isn't any I can fix this with either option. I can make a PR for these errors (they're not that frequent).
Here are the problems on webdoc's side I'll be working on this week:
You can generate the doc site locally and see if there's anything that needs to be corrected and I'll add them to this list (feel free to create issues at webdoc-labs/webdoc) |
Hi @ShukantPal, that's awesome ! I'll update and work on it as well this week; also definitely you spotted them, there are some quirky jsdoc tags that need to be fixed. I already spent some times few months ago cleaning/unifying everything and moving to a more jsdoc es6 class approach (for the melonJS 2 release), but we still do have some weird stuff here and there. |
by the way, did you already added the possibility to have a different delimiter between argument names and descriptions ? I was looking at your commits this weekend, but I don't think I saw it. I mean the one for : |
oh ok, it's just a warning actually, I thought the parser was then "ignoring" those lines because of the missing "-". Got it ! |
wow, already much more less scary now to see the parsing log 👍 |
Published 1.6.1 to fix all of these issues. https://github.com/webdoc-labs/webdoc/releases/tag/v1.6.1 There's another problem in this codebase. It uses @function to describe class methods. webdoc makes a distinction between functions and methods; methods are members of a class whereas functions are considered "independent". I think we could just get rid of the verbose @function tags in most of the codebase since webdoc infers it's a method by default. |
Yeah def retheming is the way to go IMO.
Much appreciated! Happy to see webdoc getting used! |
oh well If I need to add specific files in the melonJS repo for the docs, I'd rather then copy the template in his own repo and modify it from there to be honest. I've been trying to "unclutter" things by removing as much as possible and I have no "place" to put those stylesheets |
@obiot In this case, you're not actually copying webdoc's code - these are your theme's stylesheets. I think you'd need at most 1 or 2 CSS files. You could make a separate repo with the stylesheets and use git submodules to import them in this repo too. Or just publish the CSS files to npm and then pull them from inside |
@ShukantPal sorry about all the questions, but one more : what about all the images I'm using with the current jsdoc template: https://github.com/melonjs/jsdoc-template/tree/main/static/images |
@obiot Ideally, they should be put in a CDN and you can use the absolute URL. webdoc will eventually support in-repo assets but not atm. |
I think there's a way to import static assets in webdoc actually. I'll let you know after work today |
Nevermind, I'm adding support for copying assets over in the upcoming release. |
wow so fast ! will it work if I add both the stylesheets and static images to a "template": {
"assets": ["./node_modules/@melon/webdoc-theme/static"]
"stylesheets": [
"./node_modules/@melon/webdoc-theme/stylesheets/index.css",
"./node_modules/@melon/webdoc-theme/stylesheets/header.css",
"./node_modules/@melon/webdoc-theme/stylesheets/md.css"
], |
@obiot Yes. |
awesome, will try all that this afternoon, create the repo and populate it, thanks again for your super fast support ! funny to see how 2 somehow similar projects like pixi and melonjs (I mean 2 javacript or typescript framework) have some many different use cases when it comes to documentation ! this will for sure (hopefully) benefit all future framework that will migrate to webdoc too ! |
@obiot I was browsing through the MelonJS docs locally and saw that melonJS/src/renderable/light2d.js Line 22 in ae6d3a3
Bug in JSDoc? |
No I just did not publish the latest doc actually by the way do you know how to automatically publish to gh-pages? I tried to do it for the doc in the past but never succeeded |
I would recommend you setup a GitHub workflow with a Deploy to GitHub pages. |
@ShukantPal I just updated to the latest 1.6.2 version and modified the conf file as follow : "template": {
"applicationName": "melonJS",
"repository": "@webdoc/default-template",
"outputSourceFiles": false,
"readme": "./README.md",
"repository": "https://github.com/melonjs/melonJS/",
"assets": ["./node_modules/@melonjs/jsdoc-template/static"]
} however the path to the assets is not correct, as you can see below it properly fetch the html, but when it comes to the images the base
|
latest update :
colors are not yet fully right (I'd like to have the banner in a dark gray color, and then use the melonJS green for main text and highlight; basically same as we have now more or less: http://melonjs.github.io/melonJS/docs/), and the image assets are not yet there (as per my last feedback), but we are almost there ! |
I'll fix the image linking problem later today then! |
Looking at your theme - I didn't realize the PixiJS theme was that good 😂. |
ahahahaha thanks 😂 I've been struggling yesterday to make the webdoc one looks like the former jsdoc really (and you see how (not) far I managed to do) |
Made a PR with the changes: melonjs/webdoc-theme#1 |
you are the best ! Looking at your changes in the css, I would have never figured it out :P but I suck at web/css design, thanks a bunch, really ! I think that's ready now for publishing now, can't see right what is still missing honestly. I'll review the doc carefully for anything missing and then will go ahead ! |
Hi @ShukantPal, I was trying to to put the final touch at the documentation before publishing, but I could not find how to add a footer in the template, is it something I missing, or is not possible in the current version (which is ok, just want to add something similar to jsdoc: copyright + generated by webdoc) also I tried to Look at Algolia, create an account and everything, but I'm not sure what benefit it brings; I mean the filter/search field in the explorer is already good enough no ? and Algolia is not so simple to put in place. I created an account, got my key and all, but when I tried to update the record and upload the json manifest file (which I assume is the one to use) I got the below error : |
Hi @obiot,
I pushed a PR to upgrade your webdoc installation to 1.6.5; that version lets you configure the footer without having to re-add “Powered by webdoc!”
You can set the “template.alias.footer” property to a HTML fragment file (*.tmpl). You would basically be overriding this template file:
https://github.com/webdoc-labs/webdoc/blob/master/packages/webdoc-default-template/tmpl/components/footer/index.tmpl
In regards to Algolia,
1. I think you have to deploy your site first since Algolia will crawl through it.
2. You also have to set the “template.siteDomain” config in webdoc.conf.json to “http://melonjs.github.io<http://melonjs.github.io/>”. That will make webdoc generate a sitemap. Algolia uses the sitemap to find each page.
3. Make sure you’re using the DocSearch (legacy) Docker image: https://docsearch.algolia.com/docs/legacy/run-your-own. Then your Algolia command should look something like:
[cid:68DF5987-B34A-46A7-9D26-775027306E99]
If you invite me to your Algolia account, I might be able to give more help. The benefit of Algolia is that it is full-text search so people can search by keywords in class descriptions and members too.
On Jun 11, 2022, at 11:40 PM, Olivier Biot ***@***.******@***.***>> wrote:
Hi @ShukantPal<https://github.com/ShukantPal>,
I was trying to to put the final touch at the documentation before publishing, but I could not find how to add a footer in the template, is it something I missing, or is not possible in the current version (which is ok, just want to add something similar to jsdoc: copyright + generated by webdoc)
also I tried to Look at Algolia, create an account and everything, but I'm not sure what benefit it brings; I mean the filter/search field in the explorer is already good enough no ? and Algolia is not so simple to put in place.
I created an account, got my key and all, but when I tried to update the record and upload the json manifest file (which I assume is the one to use) I got the below error :
Upload error: Record at the position 0 objectID=97ef94bd024c5_dashboard_generated_id is too big size=1767006/100000 bytes. Please have a look at https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/in-depth/index-and-records-size-and-usage-limitations/#record-size-limits
—
Reply to this email directly, view it on GitHub<#1089 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFLJDBZ5FQPGT62CVSOSQX3VOVL4DANCNFSM5REUUUMA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
fantastic, thanks ! for Algolia I will wait next release then, plublish this version first, and indeed then let it crawl the online doc. thanks again :) |
I'm gonna close this ticket too, we are done here I believe :) we can still come back here for discussion of course. |
Hi folks, JSDoc is no longer being actively maintained and that's why I built a better, maintainable toolset called webdoc. webdoc has a more modern theme that's fully customizable! I would be down to helping you move your documentation to webdoc, the choice is up to you.
I think webdoc will bring a lot of clarity to your existing documentation, and it is pretty good for this use case. See the PixiJS (also a renderer) documentation site: https://api.pixijs.io
The text was updated successfully, but these errors were encountered: