Skip to content

Plugin feature #27

@h13i32maru

Description

@h13i32maru

Plugin provides some hook point. And users can customize data at hook points.

  • after reading config file, and customize config object.
  • after reading source code file, and customize source code.
  • after reading source code file, and use own JavaScript parse(must compatible Espree)
  • after parsing source code file, and customize AST.
  • after parsing documentation tag, and customize documentation object.
  • after building HTML, and customize HTML.

config

{
  "source": "./src",
  "destination": "./esdoc",
  "plugins": [
    {"name": "foo-esdoc-plugin", "option": {}},
    {"name": "./bar-esdoc-plugin.js", "option": {}}
  ]
}

plugin

exports.onStart = function(ev){...};
exports.onHandleConfig = function(ev){...};
exports.onHandleCode = function(ev){...};
exports.onHandleCodeParser = function(ev){...};
exports.onHandleAST = function(ev){...};
exports.onHandleTag = function(ev){...};
exports.onHandleHTML = function(ev){...};
exports.onComplete = function(ev){...};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions