Skip to content

Simple esdoc plugin to run certain babel transformations on code before handing it to esdoc

License

Notifications You must be signed in to change notification settings

mhelvens/esdoc-babel-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple esdoc plugin to run certain babel transformations on code before handing it to esdoc

Resources

License

Stars

Watchers

Forks

Packages

No packages published