Skip to content

Commit

Permalink
[NO JIRA]: Fix transpilation scripts to capture nested files (#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
olliecurtis authored Mar 18, 2024
1 parent 0e0d4b2 commit dedd58d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/transpilation/copy-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]}`;
Expand Down
4 changes: 2 additions & 2 deletions scripts/transpilation/copy-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]}`;
Expand Down

0 comments on commit dedd58d

Please sign in to comment.