diff --git a/packages/cli/src/helpers/registry.ts b/packages/cli/src/helpers/registry.ts index ef46c29..9379a78 100644 --- a/packages/cli/src/helpers/registry.ts +++ b/packages/cli/src/helpers/registry.ts @@ -23,8 +23,17 @@ export async function getAvailableComponentNames(registry: Registry): Promise { - return registry.base + registry.paths.components.replace('{componentName}', registry.components[componentName].name) +export async function getComponentURL( + registry: Registry, + componentName: string, + dirComponentFile?: string, +): Promise { + let base = + registry.base + registry.paths.components.replace('{componentName}', registry.components[componentName].name) + if (dirComponentFile) { + base += '/' + dirComponentFile + } + return base } export async function getComponentRealname(