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

Documentation generation prototype #411

Open
jonathanolson opened this issue Nov 25, 2015 · 2 comments
Open

Documentation generation prototype #411

jonathanolson opened this issue Nov 25, 2015 · 2 comments

Comments

@jonathanolson
Copy link
Contributor

Checked into existing JSDoc parsers, and it seems like all miss some aspects of how we structure code (for example, public tags won't catch 'scenery-internal' and so would be displayed, how we use inherit to set instance and static members, how we use ES5 setters/getters, etc.)

I'm adding some code to generate documentation as a solution for now (at least useful for dot/kite/scenery, as I ran into a ton of things that otherwise would need manual generation during issues like phetsims/dot#38).

It uses esprima to parse to a general AST, then extractDocumentation.js to turn this into a PhET-style-specific "AST"-like documentation object, and then documentationToHTML.js to create index/content HTML. See Dot's gruntfile for an example of how I'm currently generating Dot's documentation (which was close to barren before).

@jonathanolson
Copy link
Contributor Author

Tagging to discuss this approach (and its constraints) vs. other approaches.

@samreid
Copy link
Member

samreid commented Dec 8, 2015

I had some questions about documentation.js that I asked over in this scenery issue: phetsims/scenery#499

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

No branches or pull requests

3 participants