netcore-blueprint 1.0.20 → 1.0.21

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.
Files changed (2) hide show
  1. package/create.js +18 -0
  2. package/package.json +1 -1
package/create.js CHANGED
@@ -54,3 +54,21 @@ fs.readdirSync(templatePath).forEach(item => {
54
54
 
55
55
  console.log(`🎉 Project "${projectName}" created successfully at ${destinationPath}`);
56
56
  console.log(`📌 Open "${projectName}.sln" in Visual Studio to get started!`);
57
+
58
+ // Initialize Git and commit the first commit
59
+ try {
60
+ process.chdir(destinationPath); // Move into project directory
61
+
62
+ console.log("🚀 Initializing Git repository...");
63
+ execSync('git init', { stdio: 'inherit' });
64
+
65
+ console.log("📂 Adding all files...");
66
+ execSync('git add .', { stdio: 'inherit' });
67
+
68
+ console.log("✅ Creating first commit...");
69
+ execSync('git commit -m "Initial commit from netcore-blueprint"', { stdio: 'inherit' });
70
+
71
+ console.log("🎉 Git repository initialized successfully!");
72
+ } catch (error) {
73
+ console.error("❌ Failed to initialize Git:", error);
74
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netcore-blueprint",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "A custom .NET Core project blueprint",
5
5
  "main": "create.js",
6
6
  "bin": {