UNPKG

755 BJavaScriptView Raw
1'use strict'
2
3const EPILOG = `
4Supports options forwarding with '--' for more info check https://github.com/documentationjs/documentation/blob/master/docs/USAGE.md
5`
6
7module.exports = {
8 command: 'docs',
9 desc: 'Generate documentation from JSDoc.',
10 builder: yargs => {
11 yargs
12 .epilog(EPILOG)
13 .example('aegir docs -- --format md -o docs.md', 'Build markdown documentation.')
14 .options(
15 {
16 publish: {
17 alias: 'p',
18 type: 'boolean',
19 describe: 'Publish to GitHub Pages',
20 default: false
21 }
22 }
23 )
24 },
25 handler (argv) {
26 const docs = require('../src/docs')
27 const onError = require('../src/error-handler')
28 docs.run(argv).catch(onError)
29 }
30}