-
Notifications
You must be signed in to change notification settings - Fork 70
/
docs.config.js
48 lines (48 loc) · 1.25 KB
/
docs.config.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
const _ = require('lodash');
module.exports = {
docTitle: 'Angular 2 Facebook SDK',
templateDir: './doc_content/templates/',
templates: [
'${ doc.template }',
'${ doc.docType }.template.html',
'common.template.html'
],
tags: [
'shortdesc',
'fbdoc'
],
outputFolder: 'docs/',
sourceFiles: ['./src/**/*.ts'],
customProcessors: [
{
name: 'generate-index',
description: 'Generate index file',
$runAfter: ['paths-computed'],
$runBefore: ['rendering-docs'],
$process: docs => {
docs = docs.filter(doc => (!!doc.name && !!doc.outputPath));
docs = _(docs).sortBy(['name']).sortBy([d => {
if (d.name === 'FacebookModule') {
return 0;
} else if (d.name === 'FacebookService') {
return 1;
} else if (d.docType === 'class') {
return 2;
} else {
return 3;
}
}]).valueOf();
docs = docs.map(doc => {
doc.URL = doc.outputPath.replace('index.html', '');
return doc;
});
docs.push({
template: 'index.template.html',
outputPath: 'index.html',
pageTitle: 'Angular2 Facebook SDK'
});
return docs;
}
}
]
};