create-next-pro-stack 1.0.3 ā 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -7
- package/package.json +1 -1
- package/templates/env-setup.js +3 -2
- package/templates/vercel-setup.js +1 -1
package/index.js
CHANGED
|
@@ -51,7 +51,7 @@ async function main() {
|
|
|
51
51
|
// 1. Create Next.js using official create-next-app (Latest)
|
|
52
52
|
console.log("\nš¦ Initializing Next.js project...");
|
|
53
53
|
const tsFlag = isTypeScript ? "--ts" : "--js";
|
|
54
|
-
const craCommand = `npx create-next-app@latest ${projectName} ${tsFlag} --tailwind --eslint --app --src-dir --import-alias "@/*" --use-npm --no-git`;
|
|
54
|
+
const craCommand = `npx create-next-app@latest "${projectName}" ${tsFlag} --tailwind --eslint --app --src-dir --import-alias "@/*" --use-npm --no-git`;
|
|
55
55
|
|
|
56
56
|
run(craCommand);
|
|
57
57
|
|
|
@@ -67,7 +67,7 @@ async function main() {
|
|
|
67
67
|
console.log("\nInstalling core stack packages...");
|
|
68
68
|
|
|
69
69
|
const dependencies = [
|
|
70
|
-
"axios",
|
|
70
|
+
"axios@1.14.0",
|
|
71
71
|
"@reduxjs/toolkit",
|
|
72
72
|
"react-redux",
|
|
73
73
|
"@tanstack/react-query",
|
|
@@ -79,7 +79,6 @@ async function main() {
|
|
|
79
79
|
"sonner",
|
|
80
80
|
"recharts",
|
|
81
81
|
"lucide-react",
|
|
82
|
-
"react-router-dom",
|
|
83
82
|
"localforage",
|
|
84
83
|
"match-sorter",
|
|
85
84
|
"sort-by",
|
|
@@ -90,15 +89,15 @@ async function main() {
|
|
|
90
89
|
];
|
|
91
90
|
|
|
92
91
|
console.log("\nInstalling dependencies...");
|
|
93
|
-
run(`cd ${projectName} && npm install ${dependencies.join(" ")}`);
|
|
92
|
+
run(`cd "${projectName}" && npm install ${dependencies.join(" ")}`);
|
|
94
93
|
|
|
95
94
|
// 2.5 Initialize Shadcn UI (Default/Non-interactive)
|
|
96
95
|
console.log("\nšØ Initializing Shadcn UI...");
|
|
97
|
-
run(`cd ${projectName} && npx shadcn@latest init -d`);
|
|
96
|
+
run(`cd "${projectName}" && npx shadcn@latest init -d`);
|
|
98
97
|
|
|
99
98
|
// Install common shadcn components
|
|
100
99
|
console.log("\nš§© Installing Shadcn components (Button)...");
|
|
101
|
-
run(`cd ${projectName} && npx shadcn@latest add button -y`);
|
|
100
|
+
run(`cd "${projectName}" && npx shadcn@latest add button -y`);
|
|
102
101
|
|
|
103
102
|
// 3. Run Custom Templates (Folder structure, setups)
|
|
104
103
|
console.log("\nš Applying custom folder structure and templates...");
|
|
@@ -131,7 +130,7 @@ async function main() {
|
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
console.log("\n⨠Setup complete! Starting development server... š\n");
|
|
134
|
-
run(`cd ${projectName} && npm run dev`);
|
|
133
|
+
run(`cd "${projectName}" && npm run dev`);
|
|
135
134
|
} catch (err) {
|
|
136
135
|
console.error("\nā Something went wrong:", err.message);
|
|
137
136
|
process.exit(1);
|
package/package.json
CHANGED
package/templates/env-setup.js
CHANGED
|
@@ -2,7 +2,8 @@ import fs from "fs";
|
|
|
2
2
|
import path from "path";
|
|
3
3
|
|
|
4
4
|
export default async function setup(projectName) {
|
|
5
|
-
// Create
|
|
6
|
-
|
|
5
|
+
// Create a .env file with placeholders
|
|
6
|
+
const envContent = `NEXT_PUBLIC_BASE_URL=http://localhost:5000\n`;
|
|
7
|
+
fs.writeFileSync(path.join(projectName, ".env"), envContent);
|
|
7
8
|
console.log(" ā
.env file created.");
|
|
8
9
|
}
|