create-helloworld-app 1.0.0
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/bin/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "fs-extra";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { execa } from "execa";
|
|
5
|
+
|
|
6
|
+
const projectName = process.argv[2];
|
|
7
|
+
if (!projectName) {
|
|
8
|
+
console.error("❌ Please specify a project name");
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const targetDir = path.resolve(process.cwd(), projectName);
|
|
13
|
+
const templateDir = path.resolve(new URL(import.meta.url).pathname, "../../template");
|
|
14
|
+
|
|
15
|
+
// Copy template
|
|
16
|
+
await fs.copy(templateDir, targetDir);
|
|
17
|
+
|
|
18
|
+
// Install dependencies
|
|
19
|
+
console.log("📦 Installing dependencies...");
|
|
20
|
+
await execa("npm", ["install"], { cwd: targetDir, stdio: "inherit" });
|
|
21
|
+
|
|
22
|
+
console.log(`✅ Project ready!
|
|
23
|
+
cd ${projectName}
|
|
24
|
+
npm run dev`);
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "helloworld",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "eslint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"next": "16.1.1",
|
|
13
|
+
"react": "19.2.3",
|
|
14
|
+
"react-dom": "19.2.3"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@tailwindcss/postcss": "^4",
|
|
18
|
+
"@types/node": "^20",
|
|
19
|
+
"@types/react": "^19",
|
|
20
|
+
"@types/react-dom": "^19",
|
|
21
|
+
"eslint": "^9",
|
|
22
|
+
"eslint-config-next": "16.1.1",
|
|
23
|
+
"tailwindcss": "^4",
|
|
24
|
+
"typescript": "^5"
|
|
25
|
+
}
|
|
26
|
+
}
|