-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
45 lines (42 loc) · 1.06 KB
/
gulpfile.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
const { task, src, series, parallel } = require('gulp');
const typedoc = require('gulp-typedoc');
const clean = require('gulp-clean');
const OUT_DIR_ROOT = 'package';
const PACKAGES = [
{
name: 'recaptcha-validator',
deps: []
}
];
task('docs:clean', function() {
return src([`./${OUT_DIR_ROOT}`], {
allowEmpty: true,
read: false
}).pipe(clean());
});
task(
'docs',
series(
'docs:clean',
parallel.apply(
null,
PACKAGES.map(pkg => {
return () => {
return src([`packages/${pkg.name}/index.ts`]).pipe(
typedoc({
name: `@monument/${pkg.name}`,
mode: 'file',
exclude: pkg.deps.length > 0 ? `**/packages/+(${pkg.deps.join('|')})/**` : undefined,
out: `${OUT_DIR_ROOT}/${pkg.name}/`,
readme: `packages/${pkg.name}/README.md`,
excludePrivate: true,
excludeNotExported: true,
gaID: 'UA-129068725-1',
tsconfig: './tsconfig.json'
})
);
};
})
)
)
);