UNPKG

739 BJavaScriptView Raw
1'use strict'
2
3const EPILOG = `
4Typescript config file is required to generated docs. Try \`aegir ts --preset config > tsconfig.json\`
5`
6
7module.exports = {
8 command: 'docs',
9 desc: 'Generate documentation from TS type declarations.',
10 builder: yargs => {
11 yargs
12 .epilog(EPILOG)
13 .example('aegir docs', 'Build HTML documentation.')
14 .example('aegir docs -p', 'Build HTML documentation and publish to Github Pages.')
15 .options(
16 {
17 publish: {
18 alias: 'p',
19 type: 'boolean',
20 describe: 'Publish to GitHub Pages',
21 default: false
22 }
23 }
24 )
25 },
26 handler (argv) {
27 const docs = require('../src/docs')
28 return docs.run(argv)
29 }
30}