Skip to content

Commit

Permalink
Remove unused chart theme code (opensearch-project#657)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Myssak <[email protected]>
Co-authored-by: Andrey Myssak <[email protected]>
  • Loading branch information
SergeyMyssak and andreymyssak authored Apr 12, 2023
1 parent 1c3d9bc commit e9a63af
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 54 deletions.
49 changes: 0 additions & 49 deletions scripts/compile-oui.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,55 +308,6 @@ function compileBundle() {
}
});
console.log(chalk.green('✔ Finished test utils files'));

console.log('Building chart theme module...');
execSync(
'webpack src/themes/charts/themes.ts -o dist/oui_charts_theme.js --output-library-target="commonjs" --config=src/webpack.config.js',
{
stdio: 'inherit',
}
);
dtsGenerator({
prefix: '',
out: 'dist/oui_charts_theme.d.ts',
baseDir: path.resolve(__dirname, '..', 'src/themes/charts/'),
files: ['themes.ts'],
resolveModuleId() {
return '@opensearch-project/oui/dist/oui_charts_theme';
},
resolveModuleImport(params) {
if (params.importedModuleId === '../../components/common') {
return '@opensearch-project/oui/src/components/common';
}
return null;
}
});

/* OUI -> EUI Aliases */
execSync(
'webpack src/themes/charts/themes.ts -o dist/eui_charts_theme.js --output-library-target="commonjs" --config=src/webpack.config.js',
{
stdio: 'inherit',
}
);
dtsGenerator({
prefix: '',
out: 'dist/eui_charts_theme.d.ts',
baseDir: path.resolve(__dirname, '..', 'src/themes/charts/'),
files: ['themes.ts'],
resolveModuleId() {
return '@elastic/eui/dist/eui_charts_theme';
},
resolveModuleImport(params) {
if (params.importedModuleId === '../../components/common') {
return '@elastic/eui/src/components/common';
}
return null;
}
});
/* End of Aliases */

console.log(chalk.green('✔ Finished chart theme module'));
}

/* OUI -> EUI Aliases */
Expand Down
1 change: 0 additions & 1 deletion scripts/dtsgenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const generator = dtsGenerator({
'**/*.test.tsx',
'**/*.testenv.ts',
'**/*.testenv.tsx',
'src/themes/charts/*', // A separate d.ts file is generated for the charts theme file
'src/test/*', // A separate d.ts file is generated for test utils
'src-docs/**/*', // Don't include src-docs
],
Expand Down
1 change: 0 additions & 1 deletion src-docs/src/theme_cascadia_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@

// Elastic charts
@import '~@elastic/charts/dist/theme';
@import '../../src/themes/charts/theme';
1 change: 0 additions & 1 deletion src-docs/src/theme_cascadia_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@

// Elastic charts
@import '~@elastic/charts/dist/theme';
@import '../../src/themes/charts/theme';
1 change: 0 additions & 1 deletion src-docs/src/theme_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@

// Elastic charts
@import '~@elastic/charts/dist/theme';
@import '../../src/themes/charts/theme';
1 change: 0 additions & 1 deletion src-docs/src/theme_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@

// Elastic charts
@import '~@elastic/charts/dist/theme';
@import '../../src/themes/charts/theme';

0 comments on commit e9a63af

Please sign in to comment.