/jsdoc-githubify

A transform that adapts html files generated with jsdoc to be rendered in a github wiki or readme.

Primary LanguageJavaScriptMIT LicenseMIT

jsdoc-githubify build status

A transform that adapts html files generated with jsdoc to be rendered in a github wiki or readme.

As part of that it converts all source code indicators to point to the relevant file inside your github repository.

Installation

npm install jsdoc-githubify

How do I use this?

This transform is compatible with the following tools:

wicked is using this transform to adapt html files generated by jsdoc in order to generate API wiki pages for your project.

It uses mutiny to run the transform.

API

gitifyTransform(file)

Transforms the piped jsdoc generated html to make it usable on github, i.e. in a Readme or wiki

The resulting html has the following transformations:

  • all code sample links are redirected point to gihub repo blob
  • wrap in div.jsdoc-githubify for styling

Note:

The github blob url is derived from the remote of the github repository in the current directory and the currently checked out branch is used. You can override these with the following environment vars:

  • JSDOC_GITHUBIFY_REMOTE
  • JSDOC_GITHUBIFY_BRANCH

@name gitifyTransform @function params:

  • file String filename ignored by this transform

returns:

TransformStream into which to pipe the html string generated by jsdoc

License

MIT