diff --git a/packages/jet-brains-integration/src/types.d.ts b/packages/jet-brains-integration/src/types.d.ts index 4f421e5..8a0fa4e 100644 --- a/packages/jet-brains-integration/src/types.d.ts +++ b/packages/jet-brains-integration/src/types.d.ts @@ -20,6 +20,8 @@ export interface Options extends BaseOptions { packageJson?: boolean; /** Used to create a link within the component info bubble */ referenceTemplate?: (name: string, tag?: string) => Reference; + /** Don't generate source module and symbol reference */ + excludeSource?: boolean; } export interface Params { diff --git a/packages/jet-brains-integration/src/web-types-generator.ts b/packages/jet-brains-integration/src/web-types-generator.ts index 51c9b8d..8e0d2db 100644 --- a/packages/jet-brains-integration/src/web-types-generator.ts +++ b/packages/jet-brains-integration/src/web-types-generator.ts @@ -47,6 +47,10 @@ export function getTagList( component.tagName || toKebabCase(component.name) }${options.suffix}`, description: getComponentDetailsTemplate(component, options), + source: options.excludeSource ? undefined : { + symbol: component.name, + module: component.module.path + }, ["doc-url"]: reference?.url || "", attributes: getComponentAttributes(component, options.typesSrc), slots: component.slots?.map((slot) => { diff --git a/tools/cem-utils/src/cem-utilities.ts b/tools/cem-utils/src/cem-utilities.ts index 9528aaf..f7b2e0e 100644 --- a/tools/cem-utils/src/cem-utilities.ts +++ b/tools/cem-utils/src/cem-utilities.ts @@ -59,7 +59,7 @@ export function getComponents( (dec) => !exclude?.includes(dec.name) && ((dec as Component).customElement || (dec as Component).tagName) - ) || [] + ).map(dec => ({...dec, module: mod})) || [] ) || [] ).flat() as Component[]; }