|
@@ -2,10 +2,11 @@ const jsdoc2md = require('jsdoc-to-markdown');
|
2
|
2
|
const fs = require('fs');
|
3
|
3
|
const path = require('path');
|
4
|
4
|
|
5
|
|
-const PARAMS_DIR = './lib/src/params/';
|
6
|
|
-const OPTIONS_DIR = './lib/src/params/options/';
|
|
5
|
+const BASE_DIR = './lib/src/params/';
|
|
6
|
+const OPTIONS_DIR = BASE_DIR + 'options/';
|
|
7
|
+const CONTAINERS_DIR = BASE_DIR + 'containers/';
|
7
|
8
|
const OUTPUT_DIR = './docs/docs/';
|
8
|
|
-const OPTION_PARTIALS = ['./docs/templates/header.hbs', './docs/templates/sig-name.hbs'];
|
|
9
|
+const PARAMS_PARTIALS = ['./docs/templates/header.hbs', './docs/templates/sig-name.hbs'];
|
9
|
10
|
const PARTIALS = ['./docs/templates/scope.hbs', './docs/templates/docs.hbs'];
|
10
|
11
|
|
11
|
12
|
const generateMarkdownForFile = ({ file, outputDir, partial, separator }) => {
|
|
@@ -44,15 +45,24 @@ function inputFiles() {
|
44
|
45
|
return {
|
45
|
46
|
file: OPTIONS_DIR + file,
|
46
|
47
|
outputDir: OUTPUT_DIR + 'options/',
|
47
|
|
- partial: OPTION_PARTIALS,
|
|
48
|
+ partial: PARAMS_PARTIALS,
|
48
|
49
|
separator: false
|
49
|
50
|
};
|
50
|
51
|
}),
|
51
|
|
- ...fs.readdirSync(PARAMS_DIR)
|
52
|
|
- .filter((file) => fs.statSync(PARAMS_DIR + file).isFile())
|
|
52
|
+ ...fs.readdirSync(CONTAINERS_DIR)
|
53
|
53
|
.map((file) => {
|
54
|
54
|
return {
|
55
|
|
- file: PARAMS_DIR + file,
|
|
55
|
+ file: CONTAINERS_DIR + file,
|
|
56
|
+ outputDir: OUTPUT_DIR,
|
|
57
|
+ partial: PARAMS_PARTIALS,
|
|
58
|
+ separator: false
|
|
59
|
+ };
|
|
60
|
+ }),
|
|
61
|
+ ...fs.readdirSync(BASE_DIR)
|
|
62
|
+ .filter((file) => fs.statSync(BASE_DIR + file).isFile())
|
|
63
|
+ .map((file) => {
|
|
64
|
+ return {
|
|
65
|
+ file: BASE_DIR + file,
|
56
|
66
|
outputDir: OUTPUT_DIR
|
57
|
67
|
};
|
58
|
68
|
})
|