jsdoc-docset

0.3.0 • Public • Published

jsdoc-docset

Helpers to generate a docSet compatible with the dash application from within a jsDoc template. Requires jsDoc v3.4+

Usage

The docSet can be created from the jsdoc template publish function.

// ...
var helper = require('jsdoc/util/templateHelper');
var jsdocDocSet = require('jsdoc-docset');
// ...
exports.publish = function(taffyData, opts, tutorials) {

  // ... template logic

  return jsdocDocSet.createDocSet({
    templateHelper: helper,
    docletHelper: docletHelper,
    opts: opts
  });
};

The docletHelper can be either an object with a getCategory method that returns all members generated by jsDoc parser for a specific category. It can also be an instance of a docletHelper as defined in the upcoming new jsdoc template: jsdoc-baseline.

Implementation Example: jsdoc-dash-template

DocSet Entries Extractor as a standalone

DocSets's TOC are based on a set of entries. This library provides a class to extract them from jsdoc.

var DocSetEntries = require('jsdoc-docset').Entries;
var entries = new DocSetEntries({
  templateHelper: templateHelper,
  docletHelper: docletHelper
}).getEntries();

View Helpers

dashAnchor helper

If you want to use your docSet within the dash application, you may want to add "dash anchors" to your html documentation to provide a better navigation. Members of the page will be displayed in the left sidebar. The dashAnchor helper can be used from inside your templates to generate those anchors.

Readme

Keywords

Package Sidebar

Install

npm i jsdoc-docset

Weekly Downloads

14

Version

0.3.0

License

ISC

Unpacked Size

10.5 kB

Total Files

11

Last publish

Collaborators

  • theasta