Skip to content

Commit

Permalink
[New Theme] Rename the alias for cascadia to "next"
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki committed Jun 19, 2023
1 parent 50b2c64 commit 3f91360
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scripts/compile-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ async function compileScssFiles(
const { name } = path.parse(inputFilename);
const outputFilenames = await compileScssFile(
inputFilename,
path.join(destinationDirectory, `eui_${name.replace('cascadia', 'amsterdam')}.css`),
path.join(destinationDirectory, `eui_${name.replace('cascadia', 'amsterdam')}.json`),
path.join(destinationDirectory, `eui_${name.replace('cascadia', 'amsterdam')}.json.d.ts`),
path.join(destinationDirectory, `eui_${name.replace('cascadia', 'next')}.css`),
path.join(destinationDirectory, `eui_${name.replace('cascadia', 'next')}.json`),
path.join(destinationDirectory, `eui_${name.replace('cascadia', 'next')}.json.d.ts`),
packageName,
true
);
Expand Down
6 changes: 3 additions & 3 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { INIT_CWD, PWD = process.cwd() } = process.env;
if (!INIT_CWD?.startsWith?.(PWD)) {
// Clean up and recreate the folders
fs.rmSync('src/themes/eui', { recursive: true, force: true });
fs.rmSync('src/themes/eui-amsterdam', { recursive: true, force: true });
fs.rmSync('src/themes/eui-next', { recursive: true, force: true });

const copyDirectory = (src, dest) => {
fs.mkdirSync(dest, { recursive: true });
Expand All @@ -36,14 +36,14 @@ if (!INIT_CWD?.startsWith?.(PWD)) {
const destItem = path
.join(dest, entry.name)
.replace('oui', 'eui')
.replace('cascadia', 'amsterdam');
.replace('cascadia', 'next');

if (entry.isDirectory()) copyDirectory(srcItem, destItem);
else fs.copyFileSync(srcItem, destItem);
}
};

copyDirectory('src/themes/oui', 'src/themes/eui');
copyDirectory('src/themes/oui-cascadia', 'src/themes/eui-amsterdam');
copyDirectory('src/themes/oui-cascadia', 'src/themes/eui-next');
}
/* End of Aliases */

0 comments on commit 3f91360

Please sign in to comment.