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