documentationjs / documentationjs/documentation

Add option to ignore location in json format

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

Description

Currently, when we generate the JSON docs, It includes the location. The location includes the filename (absolute path with USERNAME).

Here is sample code from the JSON docs of `documentation.js` itself which includes the autor's (tmcw) name.
```JSON
"context": {
"loc": {
"start": {
"line": 22,
"column": 0
},
"end": {
"line": 28,
"column": 1
}
},
"file": "/Users/tmcw/src/mapbox-gl-js/js/ui/popup.js",
"code": "....",
"path": "js/ui/popup.js",
"github": "https://github.com/mapbox/mapbox-gl-js/blob/f23285cc5fc760921f455f601d113a52d7401a05/js/ui/popup.js#L22-L28"
}
```
Genrally user check in the generated docs to github or somewhere else. IMO opinion it's not good idea to check real user names.

## Proposal

* Have an option ( eg. `--no-location`) to exclude the location from the docs.

# Additional Info
* `documentation.js` version - 5.5.0
* Mode of uses - `cli`

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.