Skip to content

Commit

Permalink
chore: update template
Browse files Browse the repository at this point in the history
  • Loading branch information
2heal1 committed Mar 4, 2025
1 parent a5458e7 commit f224a95
Show file tree
Hide file tree
Showing 36 changed files with 831 additions and 1,331 deletions.
2 changes: 1 addition & 1 deletion packages/create-module-federation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Create a new Module Federation project",
"public": true,
"sideEffects": false,
"version": "0.0.0-1737428758075",
"version": "0.0.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Helmet } from '@modern-js/runtime/head';
import './index.css';
import Header from 'provider/Header';
import Description from 'provider/Description';
import Footer from 'provider/Footer';
import Provider from 'provider';

const Index = () => (
<div className="container-box">
Expand All @@ -15,9 +13,7 @@ const Index = () => (
</Helmet>

<div className="landing-page">
<Header />
<Description />
<Footer />
<Provider />
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import './App.css';
import Header from 'provider/Header';
import Description from 'provider/Description';
import Footer from 'provider/Footer';
import Provider from 'provider';

const App = () => {
return (
<div className="content">
<Header />
<Description />
<Footer />
<Provider />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ export default {
name: '{{mfName}}',
exposes: {
'.': './src/index.tsx',
'./Header': './src/Header.tsx',
'./Description': './src/Description.tsx',
'./Footer': './src/Footer.tsx',
},
shared: {
react: {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 60vh;
padding: 10vh;
background: linear-gradient(45deg, #3a65f2, #6a5acd, #8a2be2, #023cfc);
background-size: 400% 400%;
animation: gradientFlow 6s ease infinite;
}

.icon-container {
width: 180px;
margin-bottom: 20px;
position: relative;
transition: all 0.3s ease;
}

.logo-image {
width: 100%;
transition: opacity 0.3s ease;
}

.title {
font-size: 3rem;
color: #fff;
margin-bottom: 20px;
animation: fadeInUp 1s ease-out;
}

@keyframes gradientFlow {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}

@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
export * as Description from './Description';
export * as Footer from './Footer';
export * as Header from './Header';
import React from 'react';
import './index.css';

const Provider: React.FC = () => {
return (
<div className="container">
<div className="icon-container">
<img
src="https://module-federation.io/svg.svg"
alt="logo"
className="logo-image"
/>
</div>
<h1 className="title">Hello Module Federation 2.0</h1>
</div>
);
};

export default Provider;
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { createModuleFederationConfig } from '@module-federation/modern-js';
export default createModuleFederationConfig({
name: '{{mfName}}',
exposes: {
'./Header': './src/components/Header.tsx',
'./Description': './src/components/Description.tsx',
'./Footer': './src/components/Footer.tsx',
'.': './src/components/ProviderComponent.tsx',
},
shared: {
react: { singleton: true },
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f224a95

Please sign in to comment.