An ESDoc plugin that provides support for all Babel transforms.
npm install esdoc-babeljs-pluginAn ESDoc plugin which loads and transforms your javascript based on your project Babel config. This allows you to write next-gen JS :metal:,
using the latest and greatest features (e.g. Flowtype, ES2015+), while providing the benefits of having auto-generated documentation.
``sh`
npm install -S esdoc-babeljs-plugin
plugin property in your .esdoc.json config file.`json
{
"source": "./src",
"destination": "./doc",
"plugins": [{
"name": "esdoc-babeljs-plugin"
}]
}
`Add to your NPM scripts
`json
{
"scripts": {
"gen-docs": "esdoc -c .esdoc.json"
},
}
`and run:
`sh
npm run gen-docs
``Although ESDoc has support for ES2015+ core syntax, JS enhancements (e.g. Flowtype) or new syntax emerge all the time, which means that you'll probably hit a limit of what ESDoc understands.
This plugin transfers your Babel setup to help ESDoc understand your code.