JSPM

esdoc-babeljs-plugin

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q10393F
  • License MIT

An ESDoc plugin that provides support for all Babel transforms.

Package Exports

  • esdoc-babeljs-plugin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (esdoc-babeljs-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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 🤘, 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.