Skip to content

Commit 0d418b7

Browse files
authored
deps(typedoc): bump to latest version of theme and package (#16383)
* deps(typedoc): bump to latest version of theme and package * deps(typedoc): bump to official release versions * build(typedoc): refactor script to work on windows
1 parent 07e2f05 commit 0d418b7

File tree

4 files changed

+91
-61
lines changed

4 files changed

+91
-61
lines changed

package-lock.json

Lines changed: 73 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"gulp-uglify": "^3.0.1",
119119
"hammer-simulator": "0.0.1",
120120
"hammerjs": "^2.0.8",
121-
"ig-typedoc-theme": "^6.0.0",
121+
"ig-typedoc-theme": "^7.0.0",
122122
"igniteui-dockmanager": "^1.17.0",
123123
"igniteui-sassdoc-theme": "^2.1.0",
124124
"igniteui-webcomponents": "6.2.1",
@@ -146,8 +146,8 @@
146146
"stylelint-prettier": "^5.0.2",
147147
"stylelint-scss": "^6.9.0",
148148
"ts-node": "^10.8.1",
149-
"typedoc": "^0.27.0",
150-
"typedoc-plugin-localization": "^3.0.6",
149+
"typedoc": "^0.28.14",
150+
"typedoc-plugin-localization": "^3.1.0",
151151
"typescript": "5.8.3"
152152
}
153153
}

projects/igniteui-angular/src/lib/services/excel/excel-exporter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class IgxExcelExporterService extends IgxBaseExporter {
146146
}
147147

148148
private saveFile(data: Uint8Array, fileName: string): void {
149-
const blob = new Blob([data], {
149+
const blob = new Blob([data as BlobPart], {
150150
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
151151
});
152152

scripts/build-typedoc.mjs

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,35 @@
11
import path from "path";
2-
import { fileURLToPath } from "url";
2+
import { fileURLToPath } from "node:url";
33
import { Application } from "typedoc";
44
import getArgs from "./get-args.mjs";
55

66
const product = "ignite-ui-angular";
77
const { localize, jsonExport, jsonImport } = getArgs();
88
const __dirname = path.dirname(fileURLToPath(import.meta.url));
9-
const DEST = path.join.bind(
10-
null,
11-
path.resolve(__dirname, "../dist/igniteui-angular/docs"),
12-
);
9+
const toPosix = (p) => String(p).replace(/\\/g, "/");
10+
const ROOT = (...segments) => toPosix(path.resolve(__dirname, "..", ...segments));
1311

1412
/*
1513
* Determines the entry points for the documentation generation.
1614
*/
1715
function entryPoints() {
1816
if (localize === "jp") {
19-
return path.resolve(
20-
__dirname,
21-
"../i18nRepo/typedoc/ja/igniteui-angular.json",
22-
);
17+
return ROOT("i18nRepo", "typedoc", "ja", "igniteui-angular.json");
2318
}
2419

2520
if (jsonImport) {
26-
return path.resolve(
27-
__dirname,
28-
"../dist/igniteui-angular/docs/typescript-exported/igniteui-angular.json",
29-
);
21+
return ROOT("dist", "igniteui-angular", "docs", "typescript-exported", "igniteui-angular.json");
3022
}
3123

32-
return path.resolve(
33-
__dirname,
34-
"../projects/igniteui-angular/src/public_api.ts",
35-
);
24+
return ROOT("projects", "igniteui-angular", "src", "public_api.ts");
3625
}
3726

3827
/*
3928
* The output directory for the static site or json generation.
4029
*/
4130
const OUT_DIR = jsonExport
42-
? DEST("/typescript-exported/igniteui-angular.json")
43-
: DEST("/typescript");
31+
? ROOT("dist", "igniteui-angular", "docs", "typescript-exported", "igniteui-angular.json")
32+
: ROOT("dist", "igniteui-angular", "docs", "typescript");
4433

4534
/*
4635
* The Typedoc configuration object.
@@ -50,19 +39,18 @@ const CONFIG = {
5039
entryPoints: entryPoints(),
5140
entryPointStrategy: jsonImport || localize === "jp" ? "merge" : "resolve",
5241
plugin: [
53-
path.resolve(
54-
__dirname,
55-
"../node_modules/typedoc-plugin-localization/dist/index.js",
56-
),
57-
path.resolve(__dirname, "../node_modules/ig-typedoc-theme/dist/index.js"),
42+
ROOT("node_modules", "typedoc-plugin-localization", "dist", "index.js"),
43+
ROOT("node_modules", "ig-typedoc-theme", "dist", "index.js"),
5844
],
5945
theme: "igtheme",
6046
excludePrivate: true,
6147
excludeProtected: true,
6248
name: "Ignite UI for Angular",
6349
readme: "none",
6450
out: OUT_DIR,
65-
tsconfig: path.resolve(__dirname, "../tsconfig.typedoc.json"),
51+
router: "structure",
52+
logLevel: "Verbose",
53+
tsconfig: ROOT("tsconfig.typedoc.json")
6654
};
6755

6856
async function main() {
@@ -73,10 +61,7 @@ async function main() {
7361
app.options.setValue('versioning', true);
7462

7563
if (localize === "jp") {
76-
const jpTemplateStrings = path.resolve(
77-
__dirname,
78-
"../extras/template/strings/shell-strings.json",
79-
);
64+
const jpTemplateStrings = ROOT("extras", "template", "strings", "shell-strings.json");
8065
app.options.setValue("templateStrings", jpTemplateStrings);
8166
}
8267

0 commit comments

Comments
 (0)