Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(RHINENG-7074): Update inventory fec config #2194

Merged
merged 10 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ cypress/videos

codecov*
.nyc_output
reports
reports

.cache
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: node_js
notifications:
email: false
dist: focal
gkarat marked this conversation as resolved.
Show resolved Hide resolved
node_js:
- "16"
- 18
install:
- npm ci
if: tag IS blank
Expand Down
83 changes: 0 additions & 83 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
require.extensions['.css'] = () => undefined;
const path = require('path');
const glob = require('glob');

const mapper = {
TextVariants: 'Text',
DropdownPosition: 'dropdownConstants',
EmptyStateVariant: 'EmptyState',
TextListItemVariants: 'TextListItem',
TextListVariants: 'TextList',
getDefaultOUIAId: 'ouia',
useOUIAProps: 'ouia',
PaginationVariant: 'Pagination',
};

const FECMapper = {
SkeletonSize: 'Skeleton',
PageHeaderTitle: 'PageHeader',
};

const NotificationMapper = {
REMOVE_NOTIFICATION: 'actionTypes',
ADD_NOTIFICATION: 'actionTypes',
NotificationsPortal: 'NotificationPortal/index',
addNotification: 'actions',
};

const IconMapper = {
AnsibeTowerIcon: 'ansibeTower-icon',
ChartSpikeIcon: 'chartSpike-icon',
};

module.exports = {
presets: [
[
Expand All @@ -51,57 +19,6 @@ module.exports = {
'@babel/plugin-transform-runtime',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-object-rest-spread',
[
'transform-imports',
{
'@redhat-cloud-services/frontend-components-notifications': {
transform: (importName) =>
`@redhat-cloud-services/frontend-components-notifications/${
NotificationMapper[importName] || importName
}.js`,
preventFullImport: true,
},
'@redhat-cloud-services/frontend-components': {
transform: (importName) =>
`@redhat-cloud-services/frontend-components/${
FECMapper[importName] || importName
}`,
preventFullImport: true,
skipDefaultConversion: true,
},
'@patternfly/react-icons': {
transform: (importName) =>
`@patternfly/react-icons/dist/esm/icons/${
IconMapper[importName] ||
importName
.split(/(?=[A-Z])/)
.join('-')
.toLowerCase()
}.js`,
preventFullImport: true,
},
'@patternfly/react-core': {
transform: (importName) => {
const files = glob.sync(
path.resolve(
__dirname,
`./node_modules/@patternfly/react-core/dist/esm/**/${
mapper[importName] || importName
}.js`
)
);
if (files.length > 0) {
return files[0].replace(/.*(?=@patternfly)/, '');
} else {
throw `File with importName ${importName} does not exist`;
}
},
preventFullImport: false,
skipDefaultConversion: true,
},
},
'frontend-notifications',
],
],
env: {
componentTest: {
Expand Down
182 changes: 0 additions & 182 deletions config/dev.webpack.config.js

This file was deleted.

Loading