Skip to content

Commit 0559503

Browse files
committed
Update ComponentRenderer.ts
1 parent 48702d6 commit 0559503

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/cli/src/scripts/create-wrappers/ComponentRenderer.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { sinceFilter, snakeCaseToCamelCase, summaryFormatter } from '../../util/
44
import { AbstractRenderer, RenderingPhase } from './AbstractRenderer.js';
55
import type { WebComponentWrapper } from './WebComponentWrapper.js';
66

7+
const WITH_WEB_COMPONENT_DOCS_LINK = process.env.WITH_WEB_COMPONENT_DOCS_LINK ?? 'false';
78
export class ComponentRenderer extends AbstractRenderer {
89
public phase = RenderingPhase.component;
910

@@ -72,6 +73,18 @@ export class ComponentRenderer extends AbstractRenderer {
7273
if (this.note) {
7374
comment += ` * __Note__: ${this.note}\n`;
7475
}
76+
if (WITH_WEB_COMPONENT_DOCS_LINK === 'true') {
77+
let ui5wcUrl = 'https://ui5.github.io/webcomponents/components/';
78+
if (context.packageName === '@ui5/webcomponents-fiori') {
79+
ui5wcUrl += 'fiori/';
80+
} else if (context.packageName === '@ui5/webcomponents-ai') {
81+
ui5wcUrl += 'ai/';
82+
} else if (context.packageName === '@ui5/webcomponents-compat') {
83+
ui5wcUrl += 'compat/';
84+
}
85+
ui5wcUrl += context.componentName;
86+
comment += ` * __Note:__ This is a UI5 Web Component! [${context.componentName} UI5 Web Component Documentation](${ui5wcUrl}) | [Repository](https://github.com/UI5/webcomponents)\n`;
87+
}
7588
if (sinceFilter(this.since)) {
7689
comment += ` *\n`;
7790
comment += ` * @since [${this.since}](https://github.com/UI5/webcomponents/releases/tag/v${this.since}) of __${context.packageName}__.\n`;

0 commit comments

Comments
 (0)