typedoc-plugin-markdown
Advanced tools
Comparing version 4.0.0-next.60 to 4.0.0
@@ -9,4 +9,4 @@ import { Event, ProjectReflection, Reflection } from 'typedoc'; | ||
* export function load(app: MarkdownApplication) { | ||
* app.renderer.on(MarkdownPageEvent.END, (event: MarkdownPageEvent) => { | ||
* events.contents = event.contents.replace('foo', 'bar'); | ||
* app.renderer.on(MarkdownPageEvent.BEGIN, (page: MarkdownPageEvent) => { | ||
* page.contents = page.contents.replace('foo', 'bar'); | ||
* }); | ||
@@ -13,0 +13,0 @@ * }); |
@@ -12,4 +12,4 @@ "use strict"; | ||
* export function load(app: MarkdownApplication) { | ||
* app.renderer.on(MarkdownPageEvent.END, (event: MarkdownPageEvent) => { | ||
* events.contents = event.contents.replace('foo', 'bar'); | ||
* app.renderer.on(MarkdownPageEvent.BEGIN, (page: MarkdownPageEvent) => { | ||
* page.contents = page.contents.replace('foo', 'bar'); | ||
* }); | ||
@@ -16,0 +16,0 @@ * }); |
@@ -58,6 +58,6 @@ "use strict"; | ||
if (this.page.url === entryFileName) { | ||
md.push(title); | ||
md.push((0, markdown_1.bold)(title)); | ||
} | ||
else { | ||
md.push((0, markdown_1.link)(title, this.getRelativeUrl(entryFileName))); | ||
md.push((0, markdown_1.link)((0, markdown_1.bold)(title), this.getRelativeUrl(entryFileName))); | ||
} | ||
@@ -76,6 +76,6 @@ const preserveReadme = Boolean(this.page.project.readme) && | ||
if (this.page.url === readMeUrl) { | ||
md.push((0, markdown_1.link)(indexLabel, this.getRelativeUrl(indexUrl || ''))); | ||
md.push((0, markdown_1.link)((0, markdown_1.bold)(indexLabel), this.getRelativeUrl(indexUrl || ''))); | ||
} | ||
else { | ||
md.push(indexLabel); | ||
md.push((0, markdown_1.bold)(indexLabel)); | ||
} | ||
@@ -85,3 +85,3 @@ } | ||
else { | ||
md.push(indexLabel); | ||
md.push((0, markdown_1.bold)(indexLabel)); | ||
} | ||
@@ -102,8 +102,10 @@ return `${md.join(' • ')}\n\n***\n`; | ||
: packageItem.name; | ||
const packagesMeta = this.getPackageMetaData(packageItem.name); | ||
const entryModule = packagesMeta.options?.getValue('entryModule'); | ||
const packageEntryFile = `${packageItem.name}/${entryFileName}`; | ||
if (this.page.url === packageEntryFile) { | ||
md.push(packageItemName); | ||
if (this.page.url === packageEntryFile || Boolean(entryModule)) { | ||
md.push((0, markdown_1.bold)(packageItemName)); | ||
} | ||
else { | ||
md.push((0, markdown_1.link)(packageItemName, this.getRelativeUrl(packageEntryFile))); | ||
md.push((0, markdown_1.link)((0, markdown_1.bold)(packageItemName), this.getRelativeUrl(packageEntryFile))); | ||
} | ||
@@ -114,6 +116,6 @@ const preservePackageReadme = Boolean(packageItem.readme) && !this.options.getValue('mergeReadme'); | ||
if (this.page.url === packageEntryFile) { | ||
md.push((0, markdown_1.link)(indexLabel, this.getRelativeUrl(packageItem.url || ''))); | ||
md.push((0, markdown_1.link)((0, markdown_1.bold)(indexLabel), this.getRelativeUrl(packageItem.url || ''))); | ||
} | ||
else { | ||
md.push(indexLabel); | ||
md.push((0, markdown_1.bold)(indexLabel)); | ||
} | ||
@@ -123,3 +125,3 @@ } | ||
else { | ||
md.push(indexLabel); | ||
md.push((0, markdown_1.bold)(indexLabel)); | ||
} | ||
@@ -126,0 +128,0 @@ return `${md.join(' • ')}\n\n***\n`; |
{ | ||
"name": "typedoc-plugin-markdown", | ||
"version": "4.0.0-next.60", | ||
"version": "4.0.0", | ||
"description": "A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.", | ||
@@ -27,7 +27,7 @@ "main": "dist/index.js", | ||
"bugs": { | ||
"url": "https://github.com/tgreyuk/typedoc-plugin-markdown/issues" | ||
"url": "https://github.com/typedoc2md/typedoc-plugin-markdown/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tgreyuk/typedoc-plugin-markdown.git", | ||
"url": "git+https://github.com/typedoc2md/typedoc-plugin-markdown.git", | ||
"directory": "packages/typedoc-plugin-markdown" | ||
@@ -37,8 +37,8 @@ }, | ||
"keywords": [ | ||
"api", | ||
"documentation", | ||
"markdown", | ||
"typedoc", | ||
"typescript", | ||
"documentation", | ||
"api", | ||
"typedoc-plugin", | ||
"typedoc" | ||
"typedoc-plugin" | ||
], | ||
@@ -45,0 +45,0 @@ "peerDependencies": { |
# typedoc-plugin-markdown | ||
![npm](https://img.shields.io/npm/v/typedoc-plugin-markdown%2Fnext?&logo=npm) [![Build Status](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml/badge.svg?branch=next)](https://github.com/tgreyuk/typedoc-plugin-markdown/actions/workflows/ci.yml) | ||
[![npm](https://img.shields.io/npm/v/typedoc-plugin-markdown.svg?logo=npm)](https://www.npmjs.com/package/typedoc-plugin-markdown) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.yml) | ||
A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown. | ||
> A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown. | ||
@@ -10,3 +10,3 @@ ## Installation | ||
```shell | ||
npm install typedoc-plugin-markdown@next --save-dev | ||
npm install typedoc-plugin-markdown --save-dev | ||
``` | ||
@@ -16,2 +16,6 @@ | ||
Please visit the [https://typedoc-plugin-markdown.org/docs](https://typedoc-plugin-markdown.org/docs) for comprehensive documentation, including options and usage guides. | ||
Please visit the [https://typedoc-plugin-markdown.org/docs](https://typedoc-plugin-markdown.org/docs) for comprehensive documentation, including options and usage guides. | ||
## License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
303956
7991
0
19