From e9c7281c33929a96f257c4fe7baca4b64d5d1b91 Mon Sep 17 00:00:00 2001 From: p-sw Date: Sat, 15 Jun 2024 03:37:28 +0900 Subject: [PATCH] feat(cli): add overridable parameter to override component.files in getDirComponentURL --- packages/cli/src/helpers/registry.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/helpers/registry.ts b/packages/cli/src/helpers/registry.ts index eaeccef..abdb475 100644 --- a/packages/cli/src/helpers/registry.ts +++ b/packages/cli/src/helpers/registry.ts @@ -29,8 +29,9 @@ export async function getComponentURL( export async function getDirComponentURL( registry: Registry, component: RegistryComponent & {type: 'dir'}, + files?: string[], ): Promise { const base = registry.base + registry.paths.components.replace('{componentName}', component.name) - return component.files.map((filename) => base + '/' + filename) + return (files ?? component.files).map((filename) => base + '/' + filename) }