-
Notifications
You must be signed in to change notification settings - Fork 0
/
.esdoc.js
90 lines (82 loc) · 2.12 KB
/
.esdoc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Node Dependencies
const fs = require('fs');
const path = require('path');
const PATH_PROJECT = path.resolve(__dirname);
const PATH_DOC = path.join(PATH_PROJECT, 'doc');
const PATH_NODEMODULES = path.join(PATH_PROJECT, 'node_modules', '@rx-irc');
let files = [
...fs.readdirSync(PATH_DOC)
.filter(filename => filename !== 'index.md')
.filter(filename => !filename.startsWith('.'))
.filter(filename => path.extname(filename) === '.md')
.map(filename => path.join(PATH_DOC, filename)),
...fs.readdirSync(PATH_NODEMODULES)
.filter(filename => filename.startsWith('bot-'))
.map(filename => path.join(PATH_NODEMODULES, filename, 'doc'))
.map(pathname => fs.readdirSync(pathname)
.filter(filename => !filename.startsWith('.'))
.filter(filename => path.extname(filename) === '.md')
.map(filename => path.join(pathname, filename)))
.reduce((nested, flat) => flat.concat(nested), []),
];
module.exports = {
index: path.join(PATH_PROJECT, 'README.md'),
package: path.join(PATH_PROJECT, 'package.json'),
source: path.resolve(PATH_PROJECT, '..'),
destination: path.join(PATH_PROJECT, 'docs'),
includes: ['^bot(-\\w+)?/(app|lib)/.+\\.js$'],
plugins: [
{
name: 'esdoc-node',
},
{
name: 'esdoc-external-nodejs-plugin',
option: { enable: true },
},
{
name: 'esdoc-external-ecmascript-plugin',
option: { enable: true },
},
{
name: 'esdoc-ecmascript-proposal-plugin',
option: { all: true }
},
{
name: 'esdoc-accessor-plugin',
option: {
access: ['public'],
autoPrivate: true,
},
},
{
name: 'esdoc-coverage-plugin',
option: {
kind: [
'class', 'function', 'variable',
'constructor', 'method', 'member',
'get', 'set',
],
enable: true,
},
},
{
name: 'esdoc-integrate-manual-plugin',
option: {
index: path.join(PATH_DOC, 'index.md'),
asset: path.join(PATH_DOC, 'assets'),
files,
globalIndex: true,
},
},
{
name: 'esdoc-brand-plugin',
option: {
logo: path.join(PATH_DOC, 'assets', 'logo.png'),
logoDimensions: { width: '20px', height: '20px' },
},
},
{
name: 'esdoc-publish-html-plugin',
},
],
};