|
2 | 2 |
|
3 | 3 | var File = require('vinyl'),
|
4 | 4 | vfs = require('vinyl-fs'),
|
| 5 | + extend = require('extend'), |
5 | 6 | concat = require('concat-stream'),
|
6 | 7 | Handlebars = require('handlebars'),
|
7 | 8 | walk = require('../walk'),
|
@@ -39,15 +40,16 @@ function highlight(comment) {
|
39 | 40 | * Formats documentation as HTML.
|
40 | 41 | *
|
41 | 42 | * @param {Array<Object>} comments parsed comments
|
42 |
| - * @param {Object} options Options that can customize the output |
43 |
| - * @param {string} [options.theme] Name of a module used for an HTML theme. |
| 43 | + * @param {Object} opts Options that can customize the output |
| 44 | + * @param {string} [opts.theme] Name of a module used for an HTML theme. |
44 | 45 | * @param {Function} callback called with array of results as vinyl-fs objects
|
45 | 46 | * @returns {undefined} calls callback
|
46 | 47 | * @name html
|
47 | 48 | */
|
48 |
| -module.exports = function makeHTML(comments, options, callback) { |
| 49 | +module.exports = function makeHTML(comments, opts, callback) { |
49 | 50 | comments = walk(comments, highlight);
|
50 | 51 |
|
| 52 | + var options = extend({}, opts); |
51 | 53 | var themeModule = resolveTheme(options.theme);
|
52 | 54 | var pageTemplate = getTemplate(Handlebars, themeModule, 'index.hbs');
|
53 | 55 |
|
|
0 commit comments