From dedd58da38862bbe495e83be978faf3999273d9f Mon Sep 17 00:00:00 2001 From: Ollie Curtis <8831547+olliecurtis@users.noreply.github.com> Date: Mon, 18 Mar 2024 12:32:19 +0000 Subject: [PATCH] [NO JIRA]: Fix transpilation scripts to capture nested files (#3295) --- scripts/transpilation/copy-css.js | 2 +- scripts/transpilation/copy-types.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/transpilation/copy-css.js b/scripts/transpilation/copy-css.js index 8b5502f0d8..be7bace0fd 100644 --- a/scripts/transpilation/copy-css.js +++ b/scripts/transpilation/copy-css.js @@ -33,7 +33,7 @@ cssFiles.map((cssFile) => { const componentPath = paths[1].split('/'); // V2 components are nested inside a folder - if (paths[1].match(/V2/)) { + if (paths[1].match(/\/Bpk.*\//) || paths[1].match(/__generated__/)){ component = `${componentPath[0]}/${componentPath[1]}/${componentPath[2]}`; } else { component = `${componentPath[0]}/${componentPath[1]}`; diff --git a/scripts/transpilation/copy-types.js b/scripts/transpilation/copy-types.js index ad109ffa74..c279afab24 100644 --- a/scripts/transpilation/copy-types.js +++ b/scripts/transpilation/copy-types.js @@ -34,8 +34,8 @@ typeFiles.map((typeFile) => { const paths = typeFile.split('packages/'); const componentPath = paths[1].split('/'); - // V2 components are nested inside a folder - if (paths[1].match(/V2/)) { + // V2 or some components are nested inside a folder + if (paths[1].match(/\/Bpk.*\//) || paths[1].match(/__generated__/)) { component = `${componentPath[0]}/${componentPath[1]}/${componentPath[2]}`; } else { component = `${componentPath[0]}/${componentPath[1]}`;