Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/motiz88/babel-plugin-add-jsdoc-properties
Adds JSDoc annotations to source code
https://github.com/motiz88/babel-plugin-add-jsdoc-properties
Last synced: about 1 month ago
JSON representation
Adds JSDoc annotations to source code
- Host: GitHub
- URL: https://github.com/motiz88/babel-plugin-add-jsdoc-properties
- Owner: motiz88
- License: mit
- Created: 2015-07-10T06:25:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-02T07:50:29.000Z (over 7 years ago)
- Last Synced: 2024-10-08T15:37:53.545Z (about 1 month ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-add-jsdoc-properties
Adds [JSDoc](https://github.com/jsdoc3/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](https://travis-ci.org/motiz88/babel-plugin-add-jsdoc-properties.svg)](https://travis-ci.org/motiz88/babel-plugin-add-jsdoc-properties)
*Deprecation notice:* Now that [documentation.js](http://documentation.js.org/) 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
```sh
$ npm install babel-plugin-add-jsdoc-properties
```## Usage
### Via JSDoc (Recommended)
Install [jsdoc-babel](https://github.com/ctumolosus/jsdoc-babel) and load `babel-plugin-add-jsdoc-properties` within it.
**[conf.json](http://usejsdoc.org/about-configuring-jsdoc.html)**
```json
{
"plugins": ["node_modules/jsdoc-babel"],
"babel": {
"plugins": ["add-jsdoc-properties"]
}
}
```### Via `.babelrc`
**.babelrc**
```json
{
"plugins": ["add-jsdoc-properties"]
}
```### Via CLI
```sh
$ babel --plugins add-jsdoc-properties script.js
```### Via Node API
```javascript
require('babel').transform('code', {
plugins: ['add-jsdoc-properties']
});
```