Skip to content

Commit

Permalink
Completely rebuild the Renderer class
Browse files Browse the repository at this point in the history
Resolves #2397
Works towards #2111
  • Loading branch information
Gerrit0 committed Sep 24, 2023
1 parent caec4e1 commit e90a4d0
Show file tree
Hide file tree
Showing 53 changed files with 1,504 additions and 2,002 deletions.
5 changes: 0 additions & 5 deletions .config/typedoc.json
@@ -1,14 +1,9 @@
{
"$schema": "https://typedoc.org/schema.json",
"intentionallyNotExported": [
"ComponentClass",
"AbstractComponent",
"ConverterComponent",
"RendererComponent",
"SORT_STRATEGIES",
"_ModelToObject",
"EventHooksMomento",
"MarkedPlugin",
"MeaningKeywords"
],
"sort": ["kind", "instance-first", "required-first", "alphabetical"],
Expand Down
64 changes: 1 addition & 63 deletions .vscode/tasks.json
Expand Up @@ -4,77 +4,15 @@
"version": "2.0.0",
"tasks": [
{
"label": "build-tsc",
"type": "npm",
"script": "build:tsc",
"problemMatcher": ["$tsc"],
"detail": "Build TypeDoc w/ tsc",
"presentation": {
"group": "build",
"panel": "dedicated"
},
"group": {
"kind": "build"
}
},
{
"label": "build-themes",
"type": "npm",
"script": "build:themes",
"problemMatcher": ["$esbuild"],
"detail": "Build TypeDoc themes",
"presentation": {
"group": "build",
"panel": "dedicated"
},
"group": {
"kind": "build"
}
},
{
"label": "dev-build-tsc",
"label": "Build TypeDoc",
"type": "shell",
"command": "npm run build:tsc -- --watch",
"problemMatcher": ["$tsc-watch"],
"detail": "Build TypeDoc w/ tsc in watch mode",
"isBackground": true,
"presentation": {
"group": "dev",
"panel": "dedicated"
},
"group": {
"kind": "build"
}
},
{
"label": "dev-build-themes",
"type": "shell",
"command": "npm run build:themes -- --watch",
"problemMatcher": ["$esbuild-watch"],
"detail": "Build TypeDoc themes in watch mode",
"isBackground": true,
"presentation": {
"group": "dev",
"panel": "dedicated"
},
"group": {
"kind": "build"
}
},
{
"label": "dev",
"dependsOn": ["dev-build-tsc", "dev-build-themes"],
"detail": "Build TypeDoc in watch mode",
"problemMatcher": [],
"group": {
"kind": "build"
}
},
{
"label": "build",
"dependsOn": ["build-tsc", "build-themes"],
"detail": "Build TypeDoc",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
@@ -1,10 +1,17 @@
# Beta

### TODO

- Fix not exported warnings when building docs
- Fix options reading to correctly handle `outputs.path`

### API Breaking Changes

- Heavily refactored the "Component" structure that TypeDoc is based on to provided typed events.
This resulted in several component related methods being removed from Application, Converter, etc.
Most notably, `listenTo` no longer exists. Plugins should instead use `on`.
- `Converter.EVENT_CREATE_DECLARATION` will no longer sometimes be emitted for the root level `ProjectReflection`
- Removed `IndexEvent` which was created for plugin use, but ended up not actually being necessary.

# Unreleased

Expand Down Expand Up @@ -700,7 +707,7 @@
- `{@link}` tags in comments will now be resolved as declaration references similar to TSDoc's declaration references.
For most cases, this will just work. See [the documentation](https://github.com/TypeStrong/typedoc-site/blob/da9760bccf30ce96210f6e35b9dcc2a4ddeed234/guides/link-resolution.md) for details on how link resolution works.
- TypeDoc will now produce warnings for bracketed links (`[[ target ]]`). Use `{@link target}` instead. The `{@link}` syntax will be recognized by [TypeScript 4.3](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#editor-support-for-link-tags) and later and used to provide better intellisense. TypeDoc version 0.24.0 will remove support for `[[ target ]]` style links.
Support for `` [[`links`]] `` with brackets + code ticks have been dropped.
Support for ``[[`links`]]`` with brackets + code ticks have been dropped.
- `extends` in typedoc.json is now resolved using NodeJS module resolution, so a local path must begin with `./`.
- In the JSON output for `DeclarationReflection`s, `getSignature` is no longer a one-tuple.
- In the JSON output for `DeclarationReflection`s, `setSignature` is no longer a one-tuple.
Expand Down
12 changes: 6 additions & 6 deletions scripts/download_plugins.js
Expand Up @@ -28,7 +28,7 @@ function exec(command) {

async function getPackages(search) {
const query = `https://www.npmjs.com/search?q=${encodeURIComponent(
search
search,
)}`;

const results = [];
Expand All @@ -37,7 +37,7 @@ async function getPackages(search) {

do {
const data = JSON.parse(
await exec(`curl -s "${query}&page=${page++}" -H "x-spiferack: 1"`)
await exec(`curl -s "${query}&page=${page++}" -H "x-spiferack: 1"`),
);

total = data.total;
Expand Down Expand Up @@ -99,8 +99,8 @@ async function inflate(file) {
await exec(
`tar -C "${file.replace(".tgz", "")}" -xf "${file.replace(
".tgz",
".tar"
)}"`
".tar",
)}"`,
);
await fs.promises.rm(file.replace(".tgz", ".tar"));
}
Expand All @@ -110,14 +110,14 @@ async function main(args) {
const outDir = path.resolve(args[0] || "../typedoc_plugins");
const plugins = await getPlugins();
console.log(
`Found ${plugins.length} plugins updated in the past ${CUTOFF_DAYS} days.`
`Found ${plugins.length} plugins updated in the past ${CUTOFF_DAYS} days.`,
);
const tarballs = await Promise.all(plugins.map(getTarballUrl));
console.log(`Downloading tarballs...`);
await fs.promises.rm(outDir, { recursive: true, force: true });
await fs.promises.mkdir(outDir, { recursive: true });
const tarballFiles = await Promise.all(
tarballs.map((tar) => downloadTarball(tar, outDir))
tarballs.map((tar) => downloadTarball(tar, outDir)),
);
console.log(`Inflating...`);
await Promise.all(tarballFiles.map(inflate));
Expand Down
9 changes: 0 additions & 9 deletions src/index.ts
Expand Up @@ -25,19 +25,10 @@ export {

export {
Renderer,
DefaultTheme,
DefaultThemeRenderContext,
UrlMapping,
Theme,
PageEvent,
RendererEvent,
MarkdownEvent,
IndexEvent,
} from "./lib/output";
export type {
RenderTemplate,
RendererHooks,
NavigationElement,
} from "./lib/output";

export {
Expand Down

0 comments on commit e90a4d0

Please sign in to comment.