core-maugli 1.2.7 → 1.2.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/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "core-maugli",
|
3
3
|
"description": "Astro & Tailwind CSS blog theme for Maugli.",
|
4
4
|
"type": "module",
|
5
|
-
"version": "1.2.
|
5
|
+
"version": "1.2.9",
|
6
6
|
"license": "GPL-3.0-or-later OR Commercial",
|
7
7
|
"repository": {
|
8
8
|
"type": "git",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"typograf": "node typograf-batch.js",
|
22
22
|
"dev": "astro dev",
|
23
23
|
"start": "astro dev",
|
24
|
-
"build": "node typograf-batch.js && node scripts/
|
24
|
+
"build": "node typograf-batch.js && node scripts/verify-assets.js && node scripts/generate-previews.js && astro build",
|
25
25
|
"test": "node tests/examplesFilter.test.ts",
|
26
26
|
"astro": "astro",
|
27
27
|
"featured:add": "node scripts/featured.js add",
|
@@ -9,7 +9,11 @@ const __dirname = path.dirname(__filename);
|
|
9
9
|
|
10
10
|
// Определяем корневые папки
|
11
11
|
const isInNodeModules = __dirname.includes('node_modules');
|
12
|
-
const isSourceProject = !isInNodeModules && (
|
12
|
+
const isSourceProject = !isInNodeModules && (
|
13
|
+
__dirname.includes('core-maugli-blog') ||
|
14
|
+
process.cwd().includes('core-maugli-blog') ||
|
15
|
+
__dirname.includes('core-maugli')
|
16
|
+
);
|
13
17
|
|
14
18
|
const packageRoot = isInNodeModules
|
15
19
|
? path.join(__dirname, '../../..', 'node_modules', 'core-maugli') // из node_modules
|
@@ -19,6 +23,19 @@ const userRoot = isInNodeModules
|
|
19
23
|
? path.join(__dirname, '../../..') // корень пользовательского проекта
|
20
24
|
: process.env.INIT_CWD || process.cwd(); // для разработки
|
21
25
|
|
26
|
+
// Debug режим включается через переменную окружения DEBUG=true
|
27
|
+
const DEBUG = process.env.DEBUG === 'true';
|
28
|
+
|
29
|
+
if (DEBUG) {
|
30
|
+
console.log('🔍 Debug paths:');
|
31
|
+
console.log(' __dirname:', __dirname);
|
32
|
+
console.log(' isInNodeModules:', isInNodeModules);
|
33
|
+
console.log(' isSourceProject:', isSourceProject);
|
34
|
+
console.log(' packageRoot:', packageRoot);
|
35
|
+
console.log(' userRoot:', userRoot);
|
36
|
+
console.log(' packageRoot === userRoot:', packageRoot === userRoot);
|
37
|
+
}
|
38
|
+
|
22
39
|
// Список папок и файлов для полного обновления (перезаписи)
|
23
40
|
const FORCE_UPDATE_PATHS = [
|
24
41
|
'src/components',
|
@@ -106,6 +106,16 @@ function getPreviewImageSrc(imageSrc: string): string {
|
|
106
106
|
|
107
107
|
const imageSrc = image?.src || maugliConfig.defaultRubricImage;
|
108
108
|
const previewImageSrc = getPreviewImageSrc(imageSrc);
|
109
|
+
|
110
|
+
// Debug информация только в development режиме
|
111
|
+
if (import.meta.env.DEV) {
|
112
|
+
console.log('RubricCard Debug:', {
|
113
|
+
title,
|
114
|
+
originalImageSrc: imageSrc,
|
115
|
+
previewImageSrc,
|
116
|
+
defaultRubricImage: maugliConfig.defaultRubricImage
|
117
|
+
});
|
118
|
+
}
|
109
119
|
---
|
110
120
|
|
111
121
|
<a href={`/tags/${slug}/`} class="block w-full">
|