https://github.com/metadoc/metadoc-plugin
An extendable base class for building metadoc plugins.
https://github.com/metadoc/metadoc-plugin
documentation generator javascript metadoc
Last synced: over 1 year ago
JSON representation
An extendable base class for building metadoc plugins.
- Host: GitHub
- URL: https://github.com/metadoc/metadoc-plugin
- Owner: metadoc
- License: mit
- Created: 2018-08-29T17:29:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T23:54:05.000Z (over 3 years ago)
- Last Synced: 2025-03-11T11:42:06.320Z (over 1 year ago)
- Topics: documentation, generator, javascript, metadoc
- Language: JavaScript
- Size: 238 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# metadoc-plugin
An extendable base class for building metadoc plugins.
## Usage
`npm install @author.io/metadoc-plugin -D`
_An example plugin:_
```js
const MetadocPlugin = require('@author.io/metadoc-plugin')
class MyPlugin extends MetadocPlugin {
constructor () {
super(...arguments)
}
process () {
console.log('Do something with', this.data)
}
}
```
The metadoc plugin base class is en extension of the Node.js [EventEmitter](https://nodejs.org/docs/latest/api/events.html#events_class_eventemitter) class, meaning it can fire events.
It's a pretty simplistic class, so it might be easier to just **read the code**.
The key elements are the `source` and `output` attributs and the helper methods.