@vv0rkz/js-template 1.4.1 → 1.4.2

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/init.js CHANGED
@@ -53,30 +53,34 @@ if (!hasGit) {
53
53
 
54
54
  // 1. Копирование конфигов с интерактивной перезаписью
55
55
  console.log('\n📋 Копирование конфигов...')
56
- const filesToCopy = ['.gitignore', 'changelog.config.js', 'commitlint.config.js']
56
+ const filesToCopy = [
57
+ { src: 'gitignore', dest: '.gitignore' },
58
+ { src: 'changelog.config.js', dest: 'changelog.config.js' },
59
+ { src: 'commitlint.config.js', dest: 'commitlint.config.js' },
60
+ ]
57
61
 
58
62
  for (const file of filesToCopy) {
59
- const src = join(templateDir, file)
60
- const dest = join(targetDir, file)
63
+ const src = join(templateDir, file.src)
64
+ const dest = join(targetDir, file.dest)
61
65
 
62
66
  if (!existsSync(src)) {
63
- console.log(` ⚠️ ${file} не найден в template (пропускаем)`)
67
+ console.log(` ⚠️ ${file.dest} не найден в template (пропускаем)`)
64
68
  continue
65
69
  }
66
70
 
67
71
  if (existsSync(dest)) {
68
72
  // Файл существует - спрашиваем что делать
69
- const answer = await askQuestion(` ❓ ${file} уже существует. Перезаписать? (y/N): `)
73
+ const answer = await askQuestion(` ❓ ${file.dest} уже существует. Перезаписать? (y/N): `)
70
74
 
71
75
  if (answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes') {
72
76
  copyFileSync(src, dest)
73
- console.log(` ✅ ${file} (перезаписан)`)
77
+ console.log(` ✅ ${file.dest} (перезаписан)`)
74
78
  } else {
75
- console.log(` ⏭️ ${file} (пропущен)`)
79
+ console.log(` ⏭️ ${file.dest} (пропущен)`)
76
80
  }
77
81
  } else {
78
82
  copyFileSync(src, dest)
79
- console.log(` ✅ ${file}`)
83
+ console.log(` ✅ ${file.dest}`)
80
84
  }
81
85
  }
82
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vv0rkz/js-template",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Reusable setup for JS projects with husky, changelog, gh tools",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,38 @@
1
+ # dependencies
2
+ node_modules/
3
+ npm-debug.log*
4
+ yarn-debug.log*
5
+ yarn-error.log*
6
+
7
+ # production builds
8
+ dist/
9
+ build/
10
+
11
+ # environment variables
12
+ .env
13
+ .env.local
14
+ .env.development.local
15
+ .env.test.local
16
+ .env.production.local
17
+
18
+ # logs
19
+ *.log
20
+ logs/
21
+
22
+ # IDE
23
+ .vscode/
24
+ .idea/
25
+ *.swp
26
+ *.swo
27
+
28
+ # OS
29
+ .DS_Store
30
+ Thumbs.db
31
+
32
+ # Optional
33
+ .coverage/
34
+ .nyc_output/
35
+
36
+ .cache/
37
+ .webpack/
38
+ .eslintcache