1 | 'use strict'
|
2 |
|
3 | module.exports = {
|
4 | command: 'docs',
|
5 | desc: 'Generate documentation using jsdoc',
|
6 | builder: {
|
7 | publish: {
|
8 | alias: 'p',
|
9 | type: 'boolean',
|
10 | describe: 'Publish to GitHub Pages',
|
11 | default: false
|
12 | },
|
13 | docsFormats: {
|
14 | alias: 'd',
|
15 | describe: 'Which documentation formats to build',
|
16 | type: 'array',
|
17 | choices: ['html', 'md'],
|
18 | default: ['html']
|
19 | }
|
20 | },
|
21 | handler (argv) {
|
22 | const docs = require('../src/docs')
|
23 | const onError = require('../src/error-handler')
|
24 | docs.run(argv).catch(onError)
|
25 | }
|
26 | }
|