Skip to content

Support Displaying @version Tag from JSDoc in Documentation #282

@gautam-jha

Description

@gautam-jha

Problem Statement

I’m having trouble figuring out how to display the @version tag from JSDoc using web-component-analyzer (WCA). It seems like WCA might not support showing @version in the generated documentation. The @version tag is really useful for tracking the version of a component, property, or event, helping developers quickly identify which version they’re looking at. This feature would be particularly helpful for projects with frequent component updates, as it would allow version changes to be easily tracked within the documentation itself.

Feature Request

Add support for parsing and displaying the @version tag from JSDoc comments within the web-component-analyzer output. When a web component has a @version tag in its JSDoc, web-component-analyzer should capture and display this version information alongside other details in the generated documentation (e.g., in Markdown, HTML).

Example

JSDoc Input

/**
 * A button component that can be used in various places in the UI.
 *
 * @version 1.2.3
 * @tag button
 * @property {string} label - The label displayed on the button.
 */
class MyButton extends HTMLElement {
  // Component logic here
}

Desired Output (Markdown)

## MyButton

**Version:** 1.2.3

A button component that can be used in various places in the UI.

### Properties

- **foo** (string): The label displayed on the button.

Use Case

The addition of @version support would allow projects to track which version of each component is documented directly in the generated output. This would help developers understand version-specific changes without consulting external changelogs, improving clarity and streamlining the documentation process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions