Skip to content
/ esdoc Public
forked from esdoc/esdoc

ESDoc - with custom tag parsing hook for plugins.

License

Notifications You must be signed in to change notification settings

proddi/esdoc

 
 

Repository files navigation

Build Status Code Coverage

Fork information

This repo is a fork of https://github.com/esdoc/esdoc.

The main feature add is providing a Plugin-hook to extend/change ast-parsing for various doc types.

Example:

class Plugin {
  onHandleDocClass(ev) {
    const {type, Clazz, ParamParser} = ev.data;
    if (ev.data.type === 'Class') {
      ev.data.Clazz = class extends ev.data.Clazz {

        /**
         * change the parsing of @emits from:
         *   @emits <identifier> [description]
         * to:
         *   @emits <type> <name> [-] [description]
         */
        _$emits() {
          const values = this._findAllTagValues(['@emits']);
          if (!values) return;

          this._value.emits = [];
          for (const value of values) {
            const {typeText, paramName, paramDesc} = ParamParser.parseParamValue(value);
            const result = ParamParser.parseParam(typeText, paramName, paramDesc);
            this._value.emits.push(result);
          }
        }

      }
    }
  }
}

Installation

npm install --save-dev @proddi/esdoc

(original) ESDoc

ESDoc is a documentation generator for JavaScript.
Please try it out!

Features

  • Generates good documentation.
  • Measures documentation coverage.
  • Integrate test codes into documentation.
  • Integrate manual into documentation.
  • Parse ECMAScript proposals.
  • ESDoc Hosting Service

Users

And more.

Quick Start

# Move to a your project directory.
cd your-project/

# Install ESDoc and standard plugin.
npm install --save-dev esdoc esdoc-standard-plugin

# Create a configuration file.
echo '{
  "source": "./src",
  "destination": "./docs",
  "plugins": [{"name": "esdoc-standard-plugin"}]
}' > .esdoc.json

# Run ESDoc.
./node_modules/.bin/esdoc

# View a documentation
open ./docs/index.html

Document

please visit esdoc.org to see more documentation.

License

MIT

Author

Ryo Maruyama@h13i32maru

About

ESDoc - with custom tag parsing hook for plugins.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.7%
  • Makefile 0.3%