@vv0rkz/js-template 1.6.1 → 1.6.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync, writeFileSync, existsSync } from 'fs'
|
|
3
2
|
import { execSync } from 'child_process'
|
|
3
|
+
import { existsSync, readFileSync, writeFileSync } from 'fs'
|
|
4
4
|
|
|
5
5
|
console.log('🎨 Обновляю README релизами с демо...')
|
|
6
6
|
|
|
@@ -23,7 +23,6 @@ let readme = readFileSync('README.md', 'utf8')
|
|
|
23
23
|
let repoUrl
|
|
24
24
|
try {
|
|
25
25
|
const remoteUrl = execSync('git config --get remote.origin.url').toString().trim()
|
|
26
|
-
// Преобразуем git@github.com:user/repo.git в https://github.com/user/repo
|
|
27
26
|
if (remoteUrl.includes('github.com')) {
|
|
28
27
|
repoUrl = remoteUrl.replace('git@github.com:', 'https://github.com/').replace('.git', '')
|
|
29
28
|
}
|
|
@@ -51,8 +50,12 @@ versionBlocks.forEach((versionBlock) => {
|
|
|
51
50
|
return
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
// Пропускаем если нет фич
|
|
55
|
-
if (
|
|
53
|
+
// Пропускаем если нет фич (поддержка разных форматов заголовков)
|
|
54
|
+
if (
|
|
55
|
+
!versionBlock.includes('### ✨ Новые фичи') &&
|
|
56
|
+
!versionBlock.includes('### ✨ Фичи') &&
|
|
57
|
+
!versionBlock.includes('### 🚀')
|
|
58
|
+
) {
|
|
56
59
|
console.log(`⏭️ Пропускаем ${version} - нет фич`)
|
|
57
60
|
return
|
|
58
61
|
}
|
|
@@ -63,7 +66,8 @@ versionBlocks.forEach((versionBlock) => {
|
|
|
63
66
|
let inFeaturesSection = false
|
|
64
67
|
|
|
65
68
|
for (const line of lines) {
|
|
66
|
-
|
|
69
|
+
// Поддержка разных форматов заголовков фич
|
|
70
|
+
if (line.includes('### ✨ Новые фичи') || line.includes('### ✨ Фичи') || line.includes('### 🚀')) {
|
|
67
71
|
inFeaturesSection = true
|
|
68
72
|
continue
|
|
69
73
|
}
|