babel-plugin-add-jsdoc-annotations

5.1.0 • Public • Published

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.

Build Status

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.

conf.json

{
    "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']
});

Package Sidebar

Install

npm i babel-plugin-add-jsdoc-annotations

Weekly Downloads

13

Version

5.1.0

License

MIT

Last publish

Collaborators

  • churpeau