Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Willie Hung <[email protected]>
  • Loading branch information
willie-hung committed Nov 15, 2023
1 parent 4cf92ca commit a4ce756
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/compile-oui.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@ function euiBuildTimeAliasSetup() {

// Replace specific instances of oui with eui
shell.find('src/eui_components/**/*.*').forEach((file) => {
shell.sed('-i', /oui/g, 'eui', file);
shell.sed('-i', /OUI/g, 'EUI', file);
shell.sed('-i', /Oui/g, 'Eui', file);
shell.sed('-i', /\/eui/g, '/oui', file);
const quotedFile = `"${file}"`;
shell.sed('-i', /oui/g, 'eui', quotedFile);
shell.sed('-i', /OUI/g, 'EUI', quotedFile);
shell.sed('-i', /Oui/g, 'Eui', quotedFile);
shell.sed('-i', /\/eui/g, '/oui', quotedFile);
});

// Rename files to *eui*
shell.find('src/eui_components/**/*Oui*.*').forEach((file) => {
shell.mv('-f', file, file.replace('Oui', 'Eui'));
const quotedFile = `"${file}"`;
const newFileName = `"${file.replace('Oui', 'Eui')}"`;
shell.mv('-f', quotedFile, newFileName);
});

const o2eMapper = { o: 'e', O: 'E' };
Expand Down Expand Up @@ -245,7 +248,7 @@ function compileLib() {
);

execSync(
'babel --quiet --out-dir=test-env --extensions .js,.ts,.tsx --config-file="./.babelrc-test-env.js" --ignore "**/webpack.config.js,**/*.test.js,**/*.test.ts,**/*.test.tsx,**/*.d.ts" src',
'babel --quiet --out-dir=test-env --extensions .js,.ts,.tsx --config-file="./.babelrc-test-env.js" --ignore "**/webpack.config.js,**/*.test.js,**/*.test.ts,**/*.test.tsx,**/*.d.ts" "src"',
{
env: {
...process.env,
Expand Down

0 comments on commit a4ce756

Please sign in to comment.