documentationjs / documentationjs/documentation

Add support for grouping types

Open
#594 1 comment 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

Suggestion for a new option `--group` which groups types (functions, events, constants etc).

Today, given JSdoc
```
/**
* @constant SESSION
*/
/**
* @event my:event
*/
/**
* Update account data to backend. Also updates local user data if successful.
* @methodOf platform.model.user.User
* @param {Object} payload Payload according to spec
* @return {Promise} Promise of new user data.
*/
function updateAccountData(payload) {}
```

The output in markdown becomes

---

### SESSION
### my:event
### updateAccountData

---

Making no visual indication that these are of different types. I suggest to add config option `--group` which could generate the following:

----

### Constants
#### SESSION
### Events
#### my:event
### Methods
#### updateAccountData

---

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.