Skip to content

html: output both @classdesc and constructor #109

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

Open
jfirebaugh opened this issue Jun 26, 2015 · 2 comments
Open

html: output both @classdesc and constructor #109

jfirebaugh opened this issue Jun 26, 2015 · 2 comments

Comments

@jfirebaugh
Copy link
Member

jfirebaugh commented Jun 26, 2015

Documentation for a class should include both the class-level description (from @classdesc) and the description for the constructor.

Help wanted summary

  • Intent: To show the classdesc tag in HTML output. Here's the documentation for classdesc on JSDoc's site.
  • Requirements: This task requires JavaScript skills, but can be done without deep changes to documentation.js.
  • Where: this lodash template in default_theme is where we output section.description. You will add a new section ( here are examples of template syntax ) that will check whether section has a classdesc property, and if it does, output it onto the page. The value of the classdesc property will be a Markdown object, so, like section.description, you'll use the md function to turn it into a string that fits in an HTML page
  • Tests: nested.input.js is the only test fixture that generates a HTML output, so that's the place. Add a @classdesc tag to Klass and run it.

Shortcuts:

To quickly test changes to documentation.js, you can run ./bin/documentation.js instead of npm installing it. That will let you run, for instance

./bin/documentation.js serve test/fixture/html/nested.input.js

To update the test fixture, run

UPDATE=true npm test
@acanimal
Copy link

+1 I think it is important to show the class description in addition any usage example we can document on top of the class.

@jstejada
Copy link

👍

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

4 participants