esdoc-babel-plugin

1.0.1 • Public • Published

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 babel-core (version 6 or higher) and the babel plugins you want to use. For example:

npm install --save-dev babel-core 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.

Readme

Keywords

Package Sidebar

Install

npm i esdoc-babel-plugin

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mhelvens