-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathdoczrc.js
54 lines (52 loc) · 1.48 KB
/
doczrc.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
export const defaultNameYamlPlugin = function() {
return function parse(ast, file) {
const [first] = ast.children || [];
if (first && first.type !== 'yaml' ) {
const clone = [...ast.children];
ast.children = [{
type: 'yaml',
value: 'name: ',
position: {
start: { line: 1, column: 1, offset: 0 },
end: { line: 3, column: 4, offset: 62 },
indent: [ 1, 1, 1, 1 ]
},
data: {
parsedValue: { name: ' ' },
},
}].concat(clone);
ast.position.end.line += 3;
}
return ast;
}
}
export default {
title: 'MegaFon UI',
description: 'MegaFon React UI Kit',
base: '/',
dest: 'docs/',
typescript: true,
protocol: 'http',
public: 'src/public',
ignore: [
/node_modules/,
/README.md/,
/CONTRIBUTING.md/,
/CHANGELOG.md/,
/.docz/
],
menu: [
'Введение',
'Компоненты',
'Конструктор',
'Иконки',
'Цвета'
],
mdPlugins: [[defaultNameYamlPlugin, { type: 'name' }]],
notUseSpecifiers: true,
filterComponents: files =>
files
.filter(p => p.search('/src') !== -1)
.filter(p => !/.test|.docz/.test(p))
.filter(filepath => /[w-]*.(js|jsx|ts|tsx)$/.test(filepath)),
};