UNPKG

830 BMarkdownView Raw
1To create or use your own template:
2
31. Create a folder with the same name as your template (for example, `mycooltemplate`).
42. Within the template folder, create a file named `publish.js`. This file must be a CommonJS module that exports a method named `publish`.
5
6For example:
7
8````javascript
9/** @module publish */
10
11/**
12 * Generate documentation output.
13 *
14 * @param {TAFFY} data - A TaffyDB collection representing
15 * all the symbols documented in your code.
16 * @param {object} opts - An object with options information.
17 */
18exports.publish = function(data, opts) {
19 // do stuff here to generate your output files
20};
21````
22
23To invoke JSDoc 3 with your own template, use the `-t` command line option, and specify the path to your template folder:
24
25````
26./jsdoc mycode.js -t /path/to/mycooltemplate
27````
28
\No newline at end of file