Skip to content

Commit 80d5ba8

Browse files
committed
Update createFrontend.js to use react-swc template and enhance styling
1 parent 8a9f938 commit 80d5ba8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

commands/createFrontend.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ function createShadcnProject(projectName) {
2121
// Step 1: Create Vite Project
2222
console.log('📦 Creating Vite React project...');
2323
try {
24-
execSync(`npm create vite@latest ${projectName}`, { stdio: 'inherit' });
24+
execSync(`npm create vite@latest ${projectName} -- --template react-swc`, {
25+
stdio: 'inherit',
26+
});
2527
console.log('✅ Vite project created successfully.');
2628
} catch (error) {
2729
console.error(`❌ Failed to create Vite project: ${error.message}`);
@@ -165,8 +167,8 @@ function App() {
165167
return (
166168
<div className="min-h-screen flex flex-col justify-center items-center bg-gray-900 text-gray-100 font-sans">
167169
<div className="bg-white bg-opacity-5 backdrop-blur-lg p-10 rounded-xl shadow-xl max-w-md text-center border border-gray-700">
168-
<h1 className="text-2xl font-semibold mb-4 tracking-wide">MERN Project Initialized</h1>
169-
<p className="text-sm text-gray-300 mb-6">
170+
<h1 className="text-2xl text-gray-700 font-semibold mb-4 tracking-wide">MERN Project Initialized</h1>
171+
<p className="text-sm text-gray-800 mb-6">
170172
This project is powered by{' '}
171173
<a
172174
href="https://www.npmjs.com/package/mern-project-cli"
@@ -178,7 +180,7 @@ function App() {
178180
</a>
179181
, built with <strong>Shadcn UI</strong> and <strong>Tailwind CSS</strong>.
180182
</p>
181-
<p className="text-sm text-gray-300 mb-6">
183+
<p className="text-sm text-gray-800 mb-6">
182184
Check out the official{' '}
183185
<a
184186
href="https://devcli.vercel.app/"
@@ -257,7 +259,7 @@ export default function createFrontend(program) {
257259
if (options.shadcn) {
258260
createShadcnProject(projectName);
259261
} else if (options.vite) {
260-
// createViteProject(projectName);
262+
//createViteProject(projectName);
261263
}
262264
});
263265
}

0 commit comments

Comments
 (0)