@lolmath/typedoc 0.0.0-20260619213938
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-publint.log +8 -0
- package/CHANGELOG.md +7 -0
- package/frontmatter.mjs +16 -0
- package/fumadocs.mjs +23 -0
- package/package.json +34 -0
- package/typedoc.mjs +32 -0
package/CHANGELOG.md
ADDED
package/frontmatter.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MarkdownPageEvent } from "typedoc-plugin-markdown";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin to add front matter title to Markdown pages.
|
|
4
|
+
* @param {import('typedoc').Application} app - The TypeDoc application instance.
|
|
5
|
+
*/
|
|
6
|
+
export function pluginFrontMatterTitle(app) {
|
|
7
|
+
app.renderer.on(
|
|
8
|
+
MarkdownPageEvent.BEGIN,
|
|
9
|
+
/** @param {import('typedoc-plugin-markdown').MarkdownPageEvent} page */
|
|
10
|
+
(page) => {
|
|
11
|
+
if (page.model?.name) {
|
|
12
|
+
page.frontmatter.title = page.model.name;
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
);
|
|
16
|
+
}
|
package/fumadocs.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { writeFileSync } from "node:fs";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Plugin to add front matter title to Markdown pages.
|
|
5
|
+
* @param {string} title - The title to add to the front matter.
|
|
6
|
+
*/
|
|
7
|
+
export default function pluginFumaDocsSidebar(title) {
|
|
8
|
+
/**
|
|
9
|
+
* @param {import('typedoc').Application} app - The TypeDoc application instance.
|
|
10
|
+
*/
|
|
11
|
+
return (app) => {
|
|
12
|
+
app.renderer.postRenderAsyncJobs.push(async (_renderer) => {
|
|
13
|
+
const outDir = app.options.getValue("out");
|
|
14
|
+
writeFileSync(
|
|
15
|
+
`${outDir}/meta.json`,
|
|
16
|
+
JSON.stringify({
|
|
17
|
+
title,
|
|
18
|
+
root: true,
|
|
19
|
+
}),
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lolmath/typedoc",
|
|
3
|
+
"version": "0.0.0-20260619213938",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://gitlab.com/lol-math/lolmath.git",
|
|
13
|
+
"directory": "packages/typedoc"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./typedoc.mjs"
|
|
18
|
+
},
|
|
19
|
+
"./fumadocs": {
|
|
20
|
+
"import": "./fumadocs.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"typedoc": "^0.28.19",
|
|
25
|
+
"typedoc-plugin-frontmatter": "^1.3.1",
|
|
26
|
+
"typedoc-plugin-markdown": "^4.12.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"publint": "^0.3.21"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"publint": "publint"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/typedoc.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { load as pluginFrontmatter } from "typedoc-plugin-frontmatter";
|
|
2
|
+
import { load as pluginMarkdown } from "typedoc-plugin-markdown";
|
|
3
|
+
import { pluginFrontMatterTitle } from "./frontmatter.mjs";
|
|
4
|
+
|
|
5
|
+
/** @type {import("typedoc").TypeDocOptions} */
|
|
6
|
+
const config = {
|
|
7
|
+
entryPoints: ["./src/index.ts"],
|
|
8
|
+
out: "./docs",
|
|
9
|
+
plugin: [pluginMarkdown, pluginFrontmatter, pluginFrontMatterTitle],
|
|
10
|
+
mergeReadme: true,
|
|
11
|
+
hidePageHeader: true,
|
|
12
|
+
hideBreadcrumbs: true,
|
|
13
|
+
hidePageTitle: true,
|
|
14
|
+
hideGroupHeadings: false,
|
|
15
|
+
useCodeBlocks: true,
|
|
16
|
+
disableSources: false,
|
|
17
|
+
parametersFormat: "table",
|
|
18
|
+
typeAliasPropertiesFormat: "table",
|
|
19
|
+
enumMembersFormat: "table",
|
|
20
|
+
propertyMembersFormat: "table",
|
|
21
|
+
typeDeclarationFormat: "table",
|
|
22
|
+
pageTitleTemplates: {
|
|
23
|
+
member: "`{rawName}`",
|
|
24
|
+
},
|
|
25
|
+
entryFileName: "index",
|
|
26
|
+
defaultCategory: "Other",
|
|
27
|
+
router: "module",
|
|
28
|
+
gitRevision: "main",
|
|
29
|
+
publicPath: "./",
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default config;
|