Add option to ignore location in json format
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.
"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.jsversion - 5.5.0- Mode of uses -
cli
I like this idea. And, I would love to be able to suppress some other fields as well. To handle this for now, I'm using the programmatic interface and I use the JSON.stringify filter to remove fields I don't want. See: https://github.com/enactjs/docs/blob/develop/scripts/DocParser.js#L66-L91
I filter out the following: 'lineNumber', 'position', 'code', 'loc', 'context', 'path', 'loose', 'checked', 'todos', 'errors'