-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbed7af
commit 725f56d
Showing
10 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,10 @@ | |
{ | ||
"tagName": "@parentIgnore", | ||
"syntaxKind": "block" | ||
}, | ||
{ | ||
"tagName": "@version", | ||
"syntaxKind": "block" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
www/utils/packages/typedoc-plugin-markdown-medusa/src/resources/helpers/version.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as Handlebars from "handlebars" | ||
import { Reflection } from "typedoc" | ||
|
||
export default function () { | ||
Handlebars.registerHelper("version", function (reflection: Reflection) { | ||
const versionTag = reflection.comment?.blockTags.find( | ||
(tag) => tag.tag === "@version" | ||
) | ||
|
||
if (!versionTag) { | ||
return "" | ||
} | ||
|
||
const tagContent = versionTag.content | ||
.map((content) => content.text) | ||
.join("") | ||
|
||
return `:::note\n\nThis is only available after Medusa \`v${tagContent}\`.\n\n:::` | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
|
||
{{> comment}} | ||
|
||
{{{version this}}} | ||
|
||
{{/if}} | ||
|
||
{{#if (sectionEnabled "member_declaration_example")}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ | |
|
||
{{/with}} | ||
|
||
{{{version this}}} | ||
|
||
{{/if}} | ||
|
||
{{#if (sectionEnabled "member_signature_example")}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ | |
|
||
{{/with}} | ||
|
||
{{{version this}}} | ||
|
||
{{/if}} | ||
|
||
{{#if (sectionEnabled "member_signature_example")}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
{{{signatureComment}}} | ||
|
||
{{{version this}}} | ||
|
||
{{/if}} | ||
|
||
{{#if (sectionEnabled "member_signature_example")}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
{{> comment}} | ||
|
||
{{{version this}}} | ||
|
||
{{/if}} | ||
|
||
{{#if (sectionEnabled "member_signature_example")}} | ||
|