create-ipro-microfront 1.0.2 → 1.0.3

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  // Импорт необходимых зависимостей
4
4
  import { join } from "path";
5
- import { mkdirSync, rmSync } from "fs";
5
+ import { existsSync, rmSync } from "fs";
6
6
  import { execSync } from "child_process";
7
7
 
8
8
  if (process.argv.length < 3) {
@@ -15,8 +15,8 @@ if (process.argv.length < 3) {
15
15
  const projectName = process.argv[2]; // Название проекта - ipro-catalog
16
16
  const currentPath = process.cwd(); // Текущая директория - Desktop/Projects
17
17
  const projectPath = join(currentPath, projectName); // Абсолютный путь - Desktop/Projects/ipro-catalog
18
- const binPath = path.join(projectPath, "bin"); // Путь к папке bin
19
- const gitFolderPath = path.join(projectPath, ".git"); // Путь к папке .git
18
+ const gitFolderPath = join(projectPath, ".git"); // Путь к папке .git
19
+ const binPath = join(projectPath, "bin"); // Путь к папке bin
20
20
  const git_repo = "https://github.com/maxsvst/test-repo.git";
21
21
 
22
22
  // Валидация имени проекта
@@ -44,14 +44,14 @@ async function main() {
44
44
  execSync("npm install");
45
45
 
46
46
  console.log("Удаление папки .git...");
47
- if (fs.existsSync(gitFolderPath)) {
48
- fs.rmSync(gitFolderPath, { recursive: true, force: true });
47
+ if (existsSync(gitFolderPath)) {
48
+ rmSync(gitFolderPath, { recursive: true, force: true });
49
49
  console.log("Папка .git удалена.");
50
50
  }
51
51
 
52
52
  console.log("Удаление папки bin...");
53
- if (fs.existsSync(binPath)) {
54
- fs.rmSync(binPath, { recursive: true, force: true });
53
+ if (existsSync(binPath)) {
54
+ rmSync(binPath, { recursive: true, force: true });
55
55
  console.log("Папка bin удалена.");
56
56
  }
57
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ipro-microfront",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "parcel index.html",