Skip to content

Commit

Permalink
refactor(cxl-ui): use index-institute for learning components
Browse files Browse the repository at this point in the history
Create new dist JS file including components for institute part of CXL.

Avoid loading all possible components on the blog site as it doesn't
user them.
  • Loading branch information
pawelkmpt committed Jun 13, 2024
1 parent 17713d2 commit c71a616
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/cxl-ui/src/index-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,11 @@ import * as Headroom from 'headroom.js';
export { CXLAppLayoutElement } from './components/cxl-app-layout.js';
export { CXLBaseCardElement } from './components/cxl-base-card.js';
export { CXLCardElement } from './components/cxl-card.js';
export { CXLCredentialElement } from './components/cxl-credential.js';
export { CXLCourseCardElement } from './components/cxl-course-card.js';
export { CXLCourseDialogElement } from './components/cxl-course-dialog.js';
export { CXLCheckoutDetailsElement } from './components/cxl-checkout-details.js';
export { CXLDashboardHeaderElement } from './components/cxl-dashboard-header.js';
export { CXLCertificateHeaderElement } from './components/cxl-certificate-header.js';
export { CxlDashboardSectionElement } from './components/cxl-dashboard-section.js';
export { CXLDashboardNotificationElement } from './components/cxl-dashboard-notification.js';
export { CxlDashboardTeamHeaderElement } from './components/cxl-dashboard-team-header.js';
export { CxlDashboardTeamStatsElement } from './components/cxl-dashboard-team-stats.js';
export { CXLFeaturedCourseCardElement } from './components/cxl-featured-course-card.js';
export { CXLLightCardElement } from './components/cxl-light-card.js';
export { CXLNotification } from './components/cxl-notification.js';
export { CXLNotificationCardElement } from './components/cxl-notification-card.js';
export { CXLSectionElement } from './components/cxl-section.js';
export { CXLStarRatingElement } from './components/cxl-star-rating.js';
export { CXLStatsElement } from './components/cxl-stats.js';
export { CXLTabsSliderElement } from './components/cxl-tabs-slider.js';
export { CXLMarketingNavElement } from './components/cxl-marketing-nav.js';

Expand Down
12 changes: 12 additions & 0 deletions packages/cxl-ui/src/index-institute.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export { CXLCredentialElement } from './components/cxl-credential.js';
export { CXLCourseDialogElement } from './components/cxl-course-dialog.js';
export { CXLCheckoutDetailsElement } from './components/cxl-checkout-details.js';
export { CXLDashboardHeaderElement } from './components/cxl-dashboard-header.js';
export { CXLCertificateHeaderElement } from './components/cxl-certificate-header.js';
export { CxlDashboardSectionElement } from './components/cxl-dashboard-section.js';
export { CXLDashboardNotificationElement } from './components/cxl-dashboard-notification.js';
export { CxlDashboardTeamHeaderElement } from './components/cxl-dashboard-team-header.js';
export { CxlDashboardTeamStatsElement } from './components/cxl-dashboard-team-stats.js';
export { CXLFeaturedCourseCardElement } from './components/cxl-featured-course-card.js';
export { CXLNotificationCardElement } from './components/cxl-notification-card.js';
export { CXLStatsElement } from './components/cxl-stats.js';
2 changes: 2 additions & 0 deletions packages/cxl-ui/webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

// Import required packages.
// eslint-disable-next-line import/no-extraneous-dependencies
const mix = require('laravel-mix');

/*
Expand Down Expand Up @@ -81,6 +82,7 @@ mix.version();

mix
.js(`${devPath}/index-core.js`, `${distPath}/cxl-ui.js`)
.js(`${devPath}/index-institute.js`, `${distPath}/cxl-ui-institute.js`)
.js(`${devPath}/index-playbooks.js`, `${distPath}/cxl-ui-playbooks.js`)
.js(`${devPath}/index-jwplayer.js`, `${distPath}/cxl-ui-jwplayer.js`);

Expand Down

0 comments on commit c71a616

Please sign in to comment.