From 64c9d281f1a71d1c38f249b0cb01a2fb3381a331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= <188768+fb55@users.noreply.github.com> Date: Fri, 18 Mar 2022 12:04:48 +0000 Subject: [PATCH] chore(docs): Increase Node memory limit for docs `typedoc` builds successfully on my local ARM Mac, but runs out of memory on GitHub Actions. I suspect that the limit needs to be bumped slightly to make things go for now. This is a consequence of https://github.com/TypeStrong/typedoc/issues/1606 Also includes a config change of typedoc to stop emitting source code, and to exclude functions marked as `@internal`. Plus, ESLint will now ignore built docs. --- .eslintignore | 1 + package.json | 2 +- tsconfig.json | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 41c59cf75..91e0bf60b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,4 +2,5 @@ test/data/html5lib-tests test/data/html5lib-tests-fork packages/*/dist/ test/dist/ +docs/build/ node_modules diff --git a/package.json b/package.json index 6cccf1f31..a6e6651f5 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "build": "npm run build:esm && npm run build:cjs", "build:esm": "tsc --build packages/* test", "build:cjs": "tsc -p packages/parse5/tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > packages/parse5/dist/cjs/package.json", - "build:docs": "typedoc .", + "build:docs": "node --max-old-space-size=8192 node_modules/.bin/typedoc .", "prettier": "prettier '**/*.{js,ts,md,json,yml}' --loglevel warn", "format": "npm run format:es && npm run format:prettier", "format:es": "npm run lint:es -- --fix", diff --git a/tsconfig.json b/tsconfig.json index fc9e1c5f8..767e20834 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,8 @@ "out": "docs/build", "name": "parse5", "readme": "README.md", + "emit": "docs", + "excludeInternal": true, "entryPointStrategy": "packages" } }