-
Notifications
You must be signed in to change notification settings - Fork 152
Documenting .mjs, .jsx or files with any other extension
Lloyd Brookes edited this page Jun 1, 2021
·
1 revision
By default, jsdoc (used internally by jsdoc2md) does not recognise .mjs
files. To override this, you must update the includePattern
in the jsdoc configuration. Store the new pattern in a file called jsdoc.conf
. This pattern includes .js
, .jsdoc
, .jsx
and .mjs
:
$ cat jsdoc.conf
{
"source": {
"includePattern": ".+\\.(js(doc|x)?|mjs)$"
}
}
Now, launch jsdoc2md using this new jsdoc configuration, for example:
$ jsdoc2md -c jsdoc.conf index.mjs > docs.md
- Home
- How jsdoc2md works
- Additional jsdoc tags supported
- Cherry picking which documentation appears in output
- Showcase ...
- Create ...
- How To ...
- How to use with npm run
- How to use with gulp
- How to create one output file per class
- How to document a AMD module
- How to document a CommonJS module (exports)
- How to document a CommonJS module (module.exports)
- How to document an ES2015 module (multiple named exports)
- How to document an ES2015 module (single default export)
- How to document Promises (using custom tags)
- How to document a ToDo list
- How to document ES2017 features
- How to document TypeScript
- The @typicalname tag
- Linking to external resources
- Param list format options
- Listing namepaths
- Troubleshooting