esdoc-babel-7-plugin
v1.1.0
Published
Simple esdoc plugin to run certain babel transformations on code before handing it to esdoc
Downloads
3
Readme
esdoc-babel-plugin
This plugin will run code through a certain set of babel plugins before giving it back to esdoc. This can be used, for example, to remove certain syntax not supported by esdoc.
Install and usage
npm install --save-dev mhelvens/esdoc-babel-plugin
Make sure you also install the babel plugins you want to use. For example:
npm install --save-dev babel-plugin-angular2-annotations babel-plugin-transform-decorators-legacy babel-plugin-transform-flow-strip-types
Configure esdoc to use this plugin, and specify the set of babel plugins you wish to run, in .esdoc.json
:
{
// ...
"plugins": [
// ...
{
"name": "esdoc-babel-plugin",
"option": {
"plugins": [
"angular2-annotations",
"transform-decorators-legacy",
"transform-flow-strip-types"
]
}
}
]
}
Note that the "option"
object is passed directly to babel, so it supports all options that babel supports.
Execute ESDoc:
esdoc
License
MIT
Authors
Maintained by Michiel Helvensteijn.
Originally based on esdoc-flow-plugin
by Edgardo Avilés @eaviles.