@vv0rkz/js-template 1.4.2 → 1.4.4

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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { fileURLToPath } from 'url'
3
3
  import { dirname, join } from 'path'
4
- import { copyFileSync, mkdirSync, existsSync, readFileSync, writeFileSync, readdirSync, statSync } from 'fs'
4
+ import { copyFileSync, mkdirSync, existsSync, readFileSync, writeFileSync, readdirSync, statSync, unlinkSync } from 'fs'
5
5
  import { execSync, spawnSync } from 'child_process'
6
6
  import * as readline from 'readline'
7
7
 
@@ -160,6 +160,14 @@ try {
160
160
  console.log('\n🔗 Активация husky...')
161
161
  try {
162
162
  execSync('npx husky init', { stdio: 'inherit', cwd: targetDir })
163
+
164
+ // Удаляем дефолтный pre-commit с npm test
165
+ const defaultPreCommit = join(targetDir, '.husky', 'pre-commit')
166
+ if (existsSync(defaultPreCommit)) {
167
+ unlinkSync(defaultPreCommit) // ← Теперь без await import
168
+ console.log(' 🧹 Удалён дефолтный pre-commit')
169
+ }
170
+
163
171
  console.log(' ✅ Husky активирован')
164
172
  } catch (error) {
165
173
  console.log(' ⚠️ Husky уже инициализирован')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vv0rkz/js-template",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Reusable setup for JS projects with husky, changelog, gh tools",
5
5
  "type": "module",
6
6
  "bin": {
@@ -67,4 +67,4 @@ npm run _ release
67
67
 
68
68
  ---
69
69
 
70
- Создано с помощью [@vv0rkz/js-template](https://github.com/vv0rkz/js-template)
70
+ README.md создано с помощью [@vv0rkz/js-template](https://github.com/vv0rkz/js-template)