Skip to content

Commit

Permalink
feat: add back support for typedoc 0.25.13
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnsgn committed Jul 2, 2024
1 parent 1187daf commit 7cf777d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"typescript": "^5.5.2"
},
"peerDependencies": {
"typedoc": "^0.26.3"
"typedoc": "^0.25.13 || ^0.26.3"
},
"engines": {
"node": ">=18.0.0",
Expand Down
13 changes: 11 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,21 @@ export function load(app: Application) {
</script>
));

app.renderer.on(RendererEvent.END, () => {
const onRenderEnd = () => {
const from = resolve(__dirname, "../assets/style.css");
const to = resolve(
app.options.getValue("out"),
"assets/material-style.css",
);
cpSync(from, to);
});
};

// Support for 0.25.x
// @ts-ignore
if (typeof app.listenTo === "function") {
// @ts-ignore
app.listenTo(app.renderer, RendererEvent.END, onRenderEnd);
} else {
app.renderer.on(RendererEvent.END, onRenderEnd);
}
}

0 comments on commit 7cf777d

Please sign in to comment.