Skip to content
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

JSDoc: Generated documentation #1777

Closed
RunDevelopment opened this issue Feb 27, 2019 · 5 comments · Fixed by #1782
Closed

JSDoc: Generated documentation #1777

RunDevelopment opened this issue Feb 27, 2019 · 5 comments · Fixed by #1782

Comments

@RunDevelopment
Copy link
Member

Why don't we use JSDoc to add generated code documentation to the prismjs.com website? I'm thinking about something like prismjs.com/docs/.

The generated documentation will include all documented variables/functions of components/prism-core.js. Functions that aren't documented won't show up in the doc.
I already tested this a little and it works quite well.

This is intended to replace the API section of extending Prism to keep Core and its documentation more in sync to avoid issues like #1774.

(We can also use this include API docs for plugins and components like markup templating in the future.)

Thoughts?
@mAAdhaTTah @Golmote @LeaVerou

@RunDevelopment
Copy link
Member Author

I will gladly setup JSDoc and document prism-core.js.
Just tell me if we want this.

@LeaVerou
Copy link
Member

No strong opinions, but is our API large enough to warrant something like this?
On the other hand, keeping things DRY is always a good argument.

@Gahen
Copy link

Gahen commented Jun 25, 2020

I gave a look at the #1782 PR thread and saw that JSDoc may not be coming soon. As a user of this library I would love to have a bit more throughtfull documentation.

Maybe until that is done we can compile a list of things to improve on the doc and push that forward? Just having a complete documentation of the main API methods, probably in a separate page, would be enough IMO.

Maybe on top of something like https://docsify.js.org/ with a couple of .md files? Looking at the prism-core.js file it doesn't seem to be a lot of work, I can make a PR with an initial version (doc folder with some .md files) if you think it would make sense.

@RunDevelopment
Copy link
Member Author

@Gahen I re-did #1782 and we might be able to merge it within the next few days.

@Gahen
Copy link

Gahen commented Jun 28, 2020

Thank you @RunDevelopment ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants