esdoc-babeljs-plugin
v0.1.0
Published
An ESDoc plugin that provides support for all Babel transforms.
Downloads
3
Maintainers
Readme
esdoc-babel-plugin
An 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.
Install
npm install -S esdoc-babeljs-plugin
Usage
Add the plugin to the plugin
property in your .esdoc.json
config file.
{
"source": "./src",
"destination": "./doc",
"plugins": [{
"name": "esdoc-babeljs-plugin"
}]
}
Add to your NPM scripts
{
"scripts": {
"gen-docs": "esdoc -c .esdoc.json"
},
}
and run:
npm run gen-docs
License - MIT
See LICENSE for details.
Acknowledgements
This plugin is inspired by the esdoc-flow-plugin. However, this no longer appears to be actively maintained.
NOTES
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.