Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to compile typedocs into one top-level docs folder #70

Merged
merged 1 commit into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
**/z-*
**/*.log
**/doc
**/lib
**/build
**/.cache
**/.clangd
**/.ccache
Expand All @@ -9,9 +12,6 @@

.env
.cmake-js
modules/**/*/doc
modules/**/*/lib
modules/**/*/build
modules/*/include/rmm
modules/*/include/cudf
modules/*/include/cuml
Expand Down
2 changes: 1 addition & 1 deletion modules/cuda/typedoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entryPoints: ['src'],
entryPoints: ['src/index.ts'],
out: 'doc',
name: '@nvidia/cuda',
tsconfig: 'tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion modules/cudf/typedoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entryPoints: ['src'],
entryPoints: ['src/index.ts'],
out: 'doc',
name: '@nvidia/cudf',
tsconfig: 'tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion modules/cugraph/typedoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entryPoints: ['src'],
entryPoints: ['src/index.ts'],
out: 'doc',
name: '@nvidia/cugraph',
tsconfig: 'tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion modules/deck.gl/typedoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entryPoints: ['src'],
entryPoints: ['src/index.ts'],
out: 'doc',
name: '@nvidia/deck.gl',
tsconfig: 'tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion modules/glfw/typedoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entryPoints: ['src'],
entryPoints: ['src/index.ts'],
out: 'doc',
name: '@nvidia/glfw',
tsconfig: 'tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion modules/rmm/typedoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entryPoints: ['src'],
entryPoints: ['src/index.ts'],
out: 'doc',
name: '@nvidia/rmm',
tsconfig: 'tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion modules/webgl/typedoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
entryPoints: ['src'],
entryPoints: ['src/index.ts'],
out: 'doc',
name: '@nvidia/webgl',
tsconfig: 'tsconfig.json',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
],
"scripts": {
"clean": "scripts/exec.js clean",
"doc": "scripts/exec.js run doc",
"doc": "rimraf doc && typedoc --options typedoc.js && npm run doc:packages",
"doc:packages": "scripts/exec.js run doc",
"demo": "scripts/exec.js demo",
"test": "scripts/exec.js test",
"lint": "scripts/exec.js lint",
Expand Down
29 changes: 29 additions & 0 deletions typedoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const Path = require('path');
const loadOptions = (base) => {
const opts = require(Path.resolve(base, 'typedoc.js'));
opts.entryPoints = opts.entryPoints.map((entryPoint) => Path.resolve(base, entryPoint));
return opts;
};

const mergeOptions = (...opts) => Object.assign({}, ...opts, {
entryPoints: opts.reduce((es, { entryPoints = [] }) => [...es, ...entryPoints], [])
});

module.exports = mergeOptions(
loadOptions('modules/cuda'),
loadOptions('modules/rmm'),
loadOptions('modules/cudf'),
loadOptions('modules/cugraph'),
loadOptions('modules/deck.gl'),
loadOptions('modules/glfw'),
loadOptions('modules/webgl'),
{
out: 'doc',
name: 'RAPIDS',
tsconfig: 'tsconfig.json',
hideGenerator: true,
excludePrivate: true,
excludeProtected: true,
excludeExternals: true,
}
);