From 74abf9b8a7bcaa314f1d8689d014089e37ca18d0 Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Fri, 14 Apr 2023 16:36:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(react)=20format=20correctly=20sub?= =?UTF-8?q?=20folders=20components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this commit, the design tokens would contain the folders "/" in their names, which is not compliant with most of generators output we implement. --- packages/react/cunningham.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/cunningham.ts b/packages/react/cunningham.ts index 96bae41..8a27454 100644 --- a/packages/react/cunningham.ts +++ b/packages/react/cunningham.ts @@ -24,6 +24,7 @@ files.forEach((file) => { throw new Error("Tokens file does not export tokens " + file); } + componentName = componentName.replace("/", "-"); components[componentName] = res.tokens(defaultTokens); });