Documenting .mjs, .jsx or files with any other extension - jsdoc2md/jsdoc-to-markdown GitHub Wiki
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