Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: typedoc2md/typedoc-plugin-markdown
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7ece46d49ac7932c9b7c49be6a9cead824015ec4
Choose a base ref
...
head repository: typedoc2md/typedoc-plugin-markdown
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: typedoc-plugin-markdown@3.15.4
Choose a head ref
  • 10 commits
  • 12 files changed
  • 3 contributors

Commits on May 13, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0c12609 View commit details
  2. Merge pull request #433 from Divine-Software/add-package-loader

    Enable the package.json loader, so options may be read from typedocOptions
    tgreyuk authored May 13, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3a780de View commit details

Commits on Jul 24, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    84d8547 View commit details
  2. Merge pull request #453 from jackdclark/patch-1

    docs: fix typedoc options link in README
    tgreyuk authored Jul 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    834edc2 View commit details
  3. chore: Updated packages

    tgreyuk committed Jul 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5edb0be View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5a85354 View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d5af818 View commit details
  6. chore: Update readme

    tgreyuk committed Jul 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    971f883 View commit details
  7. 0.0.1

    tgreyuk committed Jul 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f08a7d1 View commit details
  8. chore: Update version

    tgreyuk committed Jul 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b4abe43 View commit details
2 changes: 1 addition & 1 deletion examples/vuepress-next/package.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
},
"devDependencies": {
"typedoc-plugin-markdown": "*",
"vuepress": "^2.0.0-beta.53",
"vuepress": "next",
"vuepress-plugin-typedoc": "*"
}
}
4 changes: 1 addition & 3 deletions examples/vuepress/package.json
Original file line number Diff line number Diff line change
@@ -8,9 +8,7 @@
},
"devDependencies": {
"typedoc-plugin-markdown": "*",
"vue": "^2.6.10",
"vue-server-renderer": "2.6.11",
"vuepress": "^1.8.2",
"vuepress": "^1.9.9",
"vuepress-plugin-typedoc": "*"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
"prettier": "^2.8.0",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typedoc": "^0.24.4",
"typedoc": "^0.24.8",
"typedoc-plugin-mdn-links": "^3.0.3",
"typescript": "^4.9.3"
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-typedoc/README.md
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ Once built the docs will be available at `/docs/api` (or equivalent out director

### TypeDoc options

To configure TypeDoc, pass any relevant [TypeDoc options](https://typedoc.org/guides/options/) to the config.
To configure TypeDoc, pass any relevant [TypeDoc options](https://typedoc.org/options/) to the config.

At a minimum the `entryPoints` and `tsconfig` options will need to be set.

2 changes: 2 additions & 0 deletions packages/docusaurus-plugin-typedoc/src/render.ts
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import {
Application,
BooleanDeclarationOption,
MixedDeclarationOption,
PackageJsonReader,
ParameterType,
ProjectReflection,
RendererEvent,
@@ -46,6 +47,7 @@ export async function render(
}

const addTypedocReaders = (app: Application) => {
app.options.addReader(new PackageJsonReader())
app.options.addReader(new TypeDocReader());
app.options.addReader(new TSConfigReader());
};
2 changes: 0 additions & 2 deletions packages/typedoc-plugin-markdown/README.md
Original file line number Diff line number Diff line change
@@ -35,8 +35,6 @@ This plugin provides additional options beyond the normal options that are [prov
Do not render breadcrumbs in template header. Defaults to `false`.
- `--hideInPageTOC<boolean>`<br>
Do not render in-page table of contents items. Defaults to `false`.
- `--hideMembersSymbol<boolean>`<br>
Do not add special symbols for class members. Defaults to `false`.
- `--publicPath<string>`<br>
Specify the base path for all urls. If undefined urls will be relative. Defaults to `.`.
- `--namedAnchors<boolean>`<br>
2 changes: 1 addition & 1 deletion packages/typedoc-plugin-markdown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typedoc-plugin-markdown",
"version": "3.15.3",
"version": "3.15.4",
"description": "A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.",
"main": "dist/index.js",
"files": [
31 changes: 18 additions & 13 deletions packages/typedoc-plugin-markdown/src/resources/helpers/comments.ts
Original file line number Diff line number Diff line change
@@ -3,25 +3,30 @@ import { Comment } from 'typedoc';
import { camelToTitleCase } from '../../utils';

export default function () {
Handlebars.registerHelper('comments', function (comment: Comment) {
const md: string[] = [];
Handlebars.registerHelper(
'comments',
function (comment: Comment, showSummary = true, showTags = true) {
const md: string[] = [];

if (comment.summary) {
md.push(Handlebars.helpers.comment(comment.summary));
}
if (showSummary && comment.summary) {
md.push(Handlebars.helpers.comment(comment.summary));
}

if (comment.blockTags?.length) {
const tags = comment.blockTags
.filter((tag) => tag.tag !== '@returns')
.map(
const filteredTags = comment.blockTags.filter(
(tag) => tag.tag !== '@returns',
);

if (showTags && comment.blockTags?.length) {
const tags = filteredTags.map(
(tag) =>
`**\`${camelToTitleCase(
tag.tag.substring(1),
)}\`**\n\n${Handlebars.helpers.comment(tag.content)}`,
);
md.push(tags.join('\n\n'));
}
md.push(tags.join('\n\n'));
}

return md.join('\n\n');
});
return md.join('\n\n');
},
);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{{{signatureTitle accessor}}}

{{> comment}}
{{#with comment}}

{{#if hasVisibleComponent}}

{{{comments this true false}}}

{{/if}}

{{/with}}

{{#if typeParameters}}

@@ -96,6 +104,16 @@

{{/ifShowReturns}}

{{#with comment}}

{{#if hasVisibleComponent}}

{{{comments this false true}}}

{{/if}}

{{/with}}

{{#if showSources}}

{{> member.sources}}
Original file line number Diff line number Diff line change
@@ -23,8 +23,6 @@ exports[`Generics: should compile class with type params 1`] = `
exports[`Generics: should compile function with a simple type param' 1`] = `
"▸ **functionWithTypeParam**<\`A\`\\>(): \`boolean\`
[partial: comment]
##### Type parameters
| Name |
22 changes: 22 additions & 0 deletions stub-project/src/comments.ts
Original file line number Diff line number Diff line change
@@ -108,3 +108,25 @@ export type literalWithBlockComments = {
*/
prop: string;
};

/**
* Creates an integer expression for the end of an interval variable.
*
* @remarks
*
* If the interval is absent then the resulting expression is also absent.
*
* @example
*
* In the following example we constraint interval variable `y` to start after end of `y` with a delay at least 10. In addition we constrain length of `x` to be less or equal than length of `y`.
*
* ```ts
* let model = new CP.Model;
* ```
*
* When `x` or `y` is _absent_ then value of both constraints above is _absent_ and therefore they are satisfied.
*
*/
export function functionWithSummaryAndTags(arg: any) {
return '';
}
Loading