mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
Also: * Fixes many issues in the default theme * Moves the default theme from default-theme to default_theme * Creates a new, robust linker infrastructure that will support bare links * Replaces slugg with github-slugger * Outputs unknown types as Any. Fixes #451
25 lines
727 B
JavaScript
25 lines
727 B
JavaScript
'use strict';
|
|
|
|
var path = require('path');
|
|
|
|
/**
|
|
* Formats documentation as HTML.
|
|
*
|
|
* @param {Array<Object>} comments Parsed comments.
|
|
* @param {Object} options Options that can customize the output
|
|
* @param {string} [options.theme='default_theme'] Name of a module used for an HTML theme.
|
|
* @param {Function} callback Called with array of results as vinyl-fs objects.
|
|
* @returns {undefined} Calls callback.
|
|
* @name html
|
|
*/
|
|
module.exports = function makeHTML(comments, options, callback) {
|
|
options = options || {};
|
|
var theme;
|
|
if (options.theme) {
|
|
theme = require(path.resolve(process.cwd(), options.theme));
|
|
} else {
|
|
theme = require('../../default_theme/');
|
|
}
|
|
theme(comments, options, callback);
|
|
};
|