Skip to content

Commit

Permalink
build: update typedoc build configuration and recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Nov 20, 2024
1 parent a5cea01 commit de6ab34
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
1 change: 1 addition & 0 deletions etc/typedoc/.typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
43 changes: 43 additions & 0 deletions etc/typedoc/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"baseUrl": "lib/node_modules",
"checkJs": true,
"forceConsistentCasingInFileNames": true,
"keyofStringsOnly": false,
"lib": [
"es6"
],
"module": "commonjs",
"moduleResolution": "node",
"newLine": "lf",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": false,
"noImplicitThis": true,
"noStrictGenericChecks": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"paths": {},
"pretty": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"suppressExcessPropertyErrors": false,
"suppressImplicitAnyIndexErrors": false,
"typeRoots": [ "." ],
"types": []
},
"include": [
"./../../lib/node_modules/**/docs/types/index.d.ts",
"./../../lib/node_modules/**/@stdlib/types/index.d.ts"
],
"exclude": [
"node_modules"
]
}
13 changes: 3 additions & 10 deletions tools/make/lib/docs/typedoc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ TYPEDOC ?= $(BIN_DIR)/typedoc
TYPEDOC_CONF ?= $(CONFIG_DIR)/typedoc/.typedoc.json

# Define the path to a TypeScript configuration file:
TYPEDOC_TSCONFIG ?= $(ROOT_DIR)/tsconfig.json
TYPEDOC_TSCONFIG ?= $(CONFIG_DIR)/typedoc/tsconfig.json

# Define the output directory for TypeDoc:
TYPEDOC_OUT ?= $(SRC_DOCS_DIR)/typedoc
Expand All @@ -44,32 +44,25 @@ TYPEDOC_HTML ?= $(TYPEDOC_HTML_OUT)/index.html

# Define command-line options to be used when invoking the TypeDoc executable to generate HTML documentation:
TYPEDOC_HTML_FLAGS ?= \
--mode modules \
--target es6 \
--module commonjs \
--options $(TYPEDOC_CONF) \
--tsconfig $(TYPEDOC_TSCONFIG) \
--excludeExternals \
--excludePrivate \
--excludeProtected \
--includeDeclarations \
--exclude '{**/*test*,**/test*.ts,**/*.js,**/*test.ts}' \
--name stdlib \
--theme $(CONFIG_DIR)/typedoc/theme/ \
--hideGenerator \
--readme $(CONFIG_DIR)/typedoc/index.md \
--gaID 'UA-105890493-1' \
--out $(TYPEDOC_HTML_OUT)

# Define command-line options to be used when invoking the TypeDoc executable to generate TypeDoc JSON:
TYPEDOC_JSON_FLAGS ?= \
--mode modules \
--target es6 \
--module commonjs \
--options $(TYPEDOC_CONF) \
--tsconfig $(TYPEDOC_TSCONFIG) \
--excludeExternals \
--excludePrivate \
--excludeProtected \
--includeDeclarations \
--exclude '{**/*test*,**/test*.ts,**/*.js,**/*test.ts}' \
--name stdlib \
--json $(TYPEDOC_JSON)
Expand Down

0 comments on commit de6ab34

Please sign in to comment.