babel-plugin-add-jsdoc-annotations
v5.1.0
Published
Adds JSDoc annotations to source code
Downloads
73
Maintainers
Readme
babel-plugin-add-jsdoc-annotations
Adds JSDoc annotations to source code.
This module only handles a handful of cases at the moment, designed to take the tedium out of documenting ES2015+ classes with JSDoc.
Deprecation notice: Now that documentation.js is a thing, this plugin will be retired. documentation.js is based on Babel, is actively developed, supports JSDoc syntax and is already very smart about inferring what it can from ES2015+ code. If anyone does want to pick up maintenance and npm releases going forward, I might be open to the idea, but I really think all the effort should rather directed at the documentation.js project.
Installation
$ npm install babel-plugin-add-jsdoc-properties
Usage
Via JSDoc (Recommended)
Install jsdoc-babel and load babel-plugin-add-jsdoc-properties
within it.
{
"plugins": ["node_modules/jsdoc-babel"],
"babel": {
"plugins": ["add-jsdoc-properties"]
}
}
Via .babelrc
.babelrc
{
"plugins": ["add-jsdoc-properties"]
}
Via CLI
$ babel --plugins add-jsdoc-properties script.js
Via Node API
require('babel').transform('code', {
plugins: ['add-jsdoc-properties']
});