netcore-blueprint 1.0.7 → 1.0.9

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/Blueprint.API.sln CHANGED
@@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
3
3
  # Visual Studio Version 17
4
4
  VisualStudioVersion = 17.10.35013.160
5
5
  MinimumVisualStudioVersion = 10.0.40219.1
6
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blueprint.API", "Blueprint.API\Blueprint.API.csproj", "{69D89003-25CF-4E3A-9BEF-78F9247B24E1}"
6
+ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blueprint.API", "Blueprint.API\Blueprint.API.csproj", "{69D89003-25CF-4E3A-9BEF-78F9247B24E1}"
7
7
  EndProject
8
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blueprint.Core", "Blueprint.Core\Blueprint.Core.csproj", "{5E5F367C-FAD3-4254-8E88-D82D797E3731}"
8
+ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blueprint.Core", "Blueprint.Core\Blueprint.Core.csproj", "{5E5F367C-FAD3-4254-8E88-D82D797E3731}"
9
9
  EndProject
10
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blueprint.Infra", "Blueprint.Infra\Blueprint.Infra.csproj", "{83F3E527-28B2-4C5F-A265-E15E76530238}"
10
+ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blueprint.Infra", "Blueprint.Infra\Blueprint.Infra.csproj", "{83F3E527-28B2-4C5F-A265-E15E76530238}"
11
11
  EndProject
12
- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blueprint.Test", "Blueprint.Test\Blueprint.Test.csproj", "{A4F5B5E9-32D8-4C4D-AED1-E2D6A9083A2E}"
12
+ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blueprint.Test", "Blueprint.Test\Blueprint.Test.csproj", "{A4F5B5E9-32D8-4C4D-AED1-E2D6A9083A2E}"
13
13
  EndProject
14
14
  Global
15
15
  GlobalSection(SolutionConfigurationPlatforms) = preSolution
package/README.md ADDED
File without changes
package/create.js CHANGED
@@ -16,20 +16,27 @@ const templateItems = [
16
16
  "Blueprint.Core",
17
17
  "Blueprint.Infra",
18
18
  "Blueprint.Test",
19
- ".gitignore"
19
+ "README.md",
20
+ "gitignore" // Rename later
20
21
  ];
21
22
 
22
- function copyItem(src, dest) {
23
+ function copyAndRename(src, dest) {
23
24
  if (fs.lstatSync(src).isDirectory()) {
24
25
  fs.mkdirSync(dest, { recursive: true });
25
26
  const entries = fs.readdirSync(src, { withFileTypes: true });
26
27
  for (let entry of entries) {
27
28
  const srcPath = path.join(src, entry.name);
28
29
  const destPath = path.join(dest, entry.name);
29
- copyItem(srcPath, destPath);
30
+ copyAndRename(srcPath, destPath);
30
31
  }
31
32
  } else {
32
- fs.copyFileSync(src, dest);
33
+ let content = fs.readFileSync(src, 'utf8');
34
+
35
+ // Rename Solution and Project Names
36
+ content = content.replace(/Blueprint\.API/g, projectName.toUpperCase());
37
+ content = content.replace(/Blueprint/g, projectName.toUpperCase());
38
+
39
+ fs.writeFileSync(dest, content);
33
40
  }
34
41
  }
35
42
 
@@ -44,15 +51,19 @@ fs.mkdirSync(destinationPath, { recursive: true });
44
51
  // Copy template files
45
52
  templateItems.forEach(item => {
46
53
  const srcPath = path.join(__dirname, item);
47
- const destPath = path.join(destinationPath, item);
54
+ let destPath = path.join(destinationPath, item);
55
+
56
+ if (item === "gitignore") {
57
+ destPath = path.join(destinationPath, ".gitignore"); // Rename to .gitignore
58
+ }
48
59
 
49
60
  if (fs.existsSync(srcPath)) {
50
61
  console.log(`✅ Copying ${item}...`);
51
- copyItem(srcPath, destPath);
62
+ copyAndRename(srcPath, destPath);
52
63
  } else {
53
64
  console.error(`❌ Critical error: "${srcPath}" does not exist.`);
54
65
  process.exit(1);
55
66
  }
56
67
  });
57
68
 
58
- console.log(`🎉 Project "${projectName}" created at ${destinationPath}`);
69
+ console.log(`🎉 Project "${projectName}" created successfully at ${destinationPath}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netcore-blueprint",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "A custom .NET Core project blueprint",
5
5
  "main": "create.js",
6
6
  "bin": {
@@ -19,7 +19,7 @@
19
19
  "Blueprint.Core/**",
20
20
  "Blueprint.Infra/**",
21
21
  "Blueprint.Test/**",
22
- ".gitignore",
23
- "README.md"
22
+ "README.md",
23
+ "gitignore"
24
24
  ]
25
25
  }
File without changes